OK, in f, *length* already knows it's argument is a list. In g, *length* doesn't know what's inside the parens, extra evaluation there. So g is already ahead before we get to what's inside the [] and (). But since both still have eval x to *thunk* : *thunk*, g evaluates "to a deeper level?" Michael > Wouldn't both functions need to evaluate x to the same level, *thunk* : *thunk* to insure listhood? > > f x = length [head *thunk* : *thunk*] > g x = length (tail *thunk* : *thunk*) > > Michael > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > Notice the two different kinds of brackets being used in f versus g :) --- On Sat, 7/31/10, Ben Millwood <haskell@benmachine.co.uk> wrote:
|