[Haskell-cafe] Re: best strategy for comparing comparisons

2008-08-11 Thread Michael Karcher
best you can expect (of course, the list of bytestrings is O(n) on the heap). Regards, Michael Karcher ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: self-referential data

2008-08-11 Thread Michael Karcher
o way around the data constructors (called BV...), even if they seem kind-of redundant. You might want to use newtype instead of data in the first three definitions to reduce runtime overhead, or even use type aliases for added convenience in trade for abstraction. Regards, Michael Kar

[Haskell-cafe] Re: Non-Overlapping Patterns

2008-05-05 Thread Michael Karcher
ordering means, that it is obvious that (foo 0 1) results in one. foo :: Int -> Int -> Bool foo x 1 = 1 foo 0 y = 0 foo x y = 2 Regards, Michael Karcher ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Couple of formal questions

2008-05-01 Thread Michael Karcher
ng in CPO has the advantage that the carriers of intial algebras and final co-algebras coincide, thus there is a single data type that comprises both finite and infinite elements. Regards, Michael Karcher ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Some clarity please!

2008-04-22 Thread Michael Karcher
is is a properly lazy implementation for min (the one in GHC's prelude is not), as it is able to calculate (take 5 $ min [1,2..] [1,2..]). This is not possible if min has to wait for compare or <= to compare the full lists before returning the head. Regards, Michael Karcher ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe