
13 Sep
2007
13 Sep
'07
10:03 a.m.
Hi
Similarly, I expect foo and foo' to be equivalent, except for strictness properties, but perhaps an underscore could be used for slightly different behaviors (interpretations, as it were)? "tail_" or "zip_", anyone?
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 [] tail_____ would not be a good name! Thanks Neil