Re: monad binding and garbage collection

2002-01-17 Thread Lars Lundgren
On Thu, 17 Jan 2002, Christian Schuhegger wrote: buildIOList :: [a] - IO [a] buildIOList li = return li main = do {li - buildIOList [1..]; putStr (show (take 1 li)); } I take it you know that do li - buildIOList [1..] ... is equal to do

Re: newtype/datatype (was efficiency)

2002-01-17 Thread Lennart Augustsson
Dylan Thurston wrote: If I understand it correctly, this makes \x.undefined :: a - b different from undefined:: a - b For instance, in this setup, the CPO [()-()] has four elements, in a totally ordered CPO; in increasing order, they are undefined const undefined id

Re: Precision of `Double's in Hugs

2002-01-17 Thread Liyang Hu
Hi, On Mon, Jan 14, 2002 at 12:39:48AM -0800, Mark P Jones wrote: Hugs uses single precision by default because the implementation using double precision relies on a hack whose behavior is not assured in any way by the C language in which it is implemented. I found this in

Regarding finding the number of unique elements in a list.

2002-01-17 Thread Amrit K Patil ;012;VKSF6;
Hi, I am newbie at Haskell. I am not able to write a program to find the number of unique elments in a list in haskell. I am also not able to write a porgram to find the elements in the innermost list in a list within lists. Can anybody guide me as to g\how to go about it or better still

Re: Regarding finding the number of unique elements in a list.

2002-01-17 Thread Ashley Yakeley
At 2002-01-17 15:14, Amrit K Patil ;012;VKSF6; wrote: I am not able to write a program to find the number of unique elments in a list in haskell. Have a look in the List library for a function that finds the unique elements of a list. I am also not able to write a porgram to find the elements

Re: Regarding finding the number of unique elements in a list.

2002-01-17 Thread Tom Bevan
I consider myself a newbie too but here are my solutions Tom On Fri, 2002-01-18 at 10:14, Amrit K Patil ;012;VKSF6; wrote: Hi, I am newbie at Haskell. I am not able to write a program to find the number of unique elments in a list in haskell. I am also not able to write a porgram

Re: Regarding finding the number of unique elements in a list.

2002-01-17 Thread Ketil's local user
Amrit K Patil ;012;VKSF6; [EMAIL PROTECTED] writes: I am not able to write a program to find the number of unique elments in a list in haskell. Why not? Are you able to find the number of unique elements yourself? How? I can think of a few ways to do it, for instance remove all