[Haskell-cafe] List spine traversal

Deniz Dogan deniz.a.m.dogan at gmail.com
Mon Jun 29 05:14:05 EDT 2009


2009/6/29 Martijn van Steenbergen <martijn at van.steenbergen.nl>:
> Tony Morris wrote:
>>
>> Is there a canonical function for traversing the spine of a list?
>>
>> I could use e.g. (seq . length) but this feels dirty, so I have foldl'
>> (const . const $ ()) () which still doesn't feel right. What's the
>> typical means of doing this?
>
> (seq . length) doesn't sound that bad to me.
>
> Martijn.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

What is the spine of a list? Google seems to fail me on this one.

-- 
Deniz Dogan


More information about the Haskell-Cafe mailing list