
30 Aug
2011
30 Aug
'11
9:21 p.m.
toFList [] = id toFList (xs++ys) = toFList xs . toFList ys
toList id = [] toList (f . g) = toList f ++ toList g
These laws do not *define* the isomorphisms because their behavior on singletons is not fixed. Combining them with laws using a 'point' function for functional lists point = (:) the isomorphisms are characterized uniquely: toFList [x] = point x toList (point x) = [x] This might be an argument in favor of a Pointed class without Functor constraint as it shows that other pointed structures have reasonable laws involving 'point' as well. Sebastian