
13 Sep
2007
13 Sep
'07
12:56 p.m.
Hi
From the logical point of view tailMay is the right one. It pushes the error handling to the caller programm.
tail = fromJust . tailMay
The error messages suffer: tail [] = "error: fromJust Nothing" That's why I supplied tailNote, where tailNote "foo broke its invariant!" [] gives the message "error: tail [], foo broke its invariant!" Thanks Neil