[Haskell-cafe] Re: [] vs [()]

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Fri Oct 10 04:51:45 EDT 2008

"Daryoush Mehrtash" <dmehrtash at gmail.com> writes:

> What is the difference between empty list [] and list with one unit
> element [()]?

   Prelude> :m + Data.List
   Prelude Data.List> []\\[()]

or, for completeness, the difference between a list with one
unit element and the empty list:

   Prelude Data.List> [()]\\[]


Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk

More information about the Haskell-Cafe mailing list