> dmehrtash: > > What is the difference between empty list [] and list with one unit > > element [()]? > > Prelude> length [] > 0 > Prelude> length [()] > 1
Also, they differ in type. [()] is a list of unit elements, and happens to contain exactly one of them. [] is a (polymorphic) list of any kind of element, and happens not to contain any of them. Regards, John _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
