[Haskell-cafe] When folding is there a way to pick out the last point being processed?

Tony Morris tonymorris at gmail.com
Thu Jun 11 22:33:13 EDT 2009


By swapping from foldl to foldr? Care to provide more detail?

Casey Hawthorne wrote:
> When folding is there a way to pick out the last point being
> processed?
>
> The first point can easily be picked out with (x:xs) but last xs
> crawls down the list.
> --
> Regards,
> Casey
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>   

-- 
Tony Morris
http://tmorris.net/




More information about the Haskell-Cafe mailing list