From Hoogle: Query: (:[])
Error: Prelude> let h = length . (:[]) . head Prelude> h undefined 1 Prelude> :t (:[]) (:[]) :: a -> [a] Prelude> h [] 1 <======== this comes as a surprise Prelude> Are you saying: [ head x ] -> [ *thunk* ] and length [ *thunk* ] -> 1, independent of what *thunk* is, even head [], i.e., *thunk* never needs be evaluated? Michael
--- On Sat, 7/31/10, Ben Millwood <haskell@benmachine.co.uk> wrote:
|