[It is a philosophical question, not a practical programming problem.]

I'm used, in imperative programming languages with exceptions (like
Python) to call any function without fear of stopping the program
because I can always catch the exceptions with things like (Python):

while not over:
   try: 
      code which may raise an exception...
   except Exception e:
      do something clever

How to do it in Haskell? How can I call functions like Prelude.head
while being sure my program won't stop, even if I call head on an
empty list (thus calling "error")?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to