[Haskell] making inits less strict

Ian Lynagh igloo at earth.li
Wed Apr 23 20:22:03 EDT 2008


On Mon, Apr 07, 2008 at 03:11:16PM -0400, John Tromp wrote:
> An improved version is:
> 
>   inits l = [] : case l of []     -> []
>                            (x:xs) -> map (x:) inits xs

For information on how to propose this, please see
http://www.haskell.org/haskellwiki/Library_submissions


Thanks
Ian



More information about the Haskell mailing list