[clean-list] key mapping

F.S.A.Zuurbier@inter.nl.net F.S.A.Zuurbier@inter.nl.net
Thu, 5 Apr 2001 11:00:38 +0200 (MET DST)


Marc Poppleton wrote: 

get :: Int Int (Mat Int) -> Int 
get 0 _ _= ? <- How can I return nothing or better an error? 
get x y mat= nth y (nth x mat) 

You can replace ? by
undef
or by
abort "any string"
where you can include a meaningful message in the string, that will be displayed when the program runs into the error case.