Am Donnerstag 04 Februar 2010 23:18:34 schrieb Daniel Peebles: > > data Stack a = EmptyStk | Stk a (Stack a) > > I find it amusing that the book defined a type that is exactly > isomorphic to the standard list (EmptyStk === [] and Stk === (:)). I > guess it's just for clarity?
Also type safety, I think. However, I prefer newtype Stack a = Stack [a] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe