
13 Sep
2007
13 Sep
'07
1:16 p.m.
On Thu, 2007-09-13 at 13:56 +0100, Neil Mitchell wrote:
tail = fromJust . tailMay
The error messages suffer [..] That's why I supplied tailNote
Still, given tailMay, we have: tailDef xs = maybe xs id . tailMay tailNote msg = tailDef (error msg) tailSafe = tailDef [] tail = tailNote "tail: empty list" which I suppose was Lutz's point? (My rather ugly preference is to #define tail so that an error message contains source code location.) -k