Tomasz Zielonka wrote: > In the Ord variant, the result value pretty much has to come from the > input list or be bottom. It has to be bottom for the empty list. If > f :: Ord a => [a] -> a and g preserves order (is monotonic) then > f (map g l) == g (f l) > This could be nice for testing Ord instances. Unfortunately, for bounded > types the only order preserving function is id.
Interesting... are the following g allowed? (I am relatively new to parametericity results.) (\!x -> (x,4)) -- bounded types (?) ($!) Data.List.repeat -- ;-) unbounded types Zun. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe