[Haskell-cafe] Re: Is "take" behaving correctly?

Jeff Polakow jeff.polakow at db.com
Thu Sep 13 08:44:14 EDT 2007


Hello,
 
> There are 4 variants of tail:
> 
> tail :: [a] -> [a] -- normal
> tailDef :: [a] -> [a] -> [a] -- returns the first argument on []
> tailMay :: [a] -> Maybe [a] -- returns a Nothing
> tailNote :: String -> [a] -> [a] -- crashes, but with a helpful message
> tailSafe :: [a] -> [a] -- returns [] on []
> 
Is there a reason for not having

    tailM :: Monad m => [a] -> m [a]

which, at least for me, is much more useful?

-Jeff


---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070913/bb9898f5/attachment.htm


More information about the Haskell-Cafe mailing list