[Haskell-cafe] return?

Vikrant vikrant.patil at gmail.com
Tue Feb 20 02:59:16 EST 2007

    I am writing a recursive function which does some IO operation. I
encounter situation in which my function has to end recursion by doing
"nothing" and otherwise keep calling same function with some different
parameters. I did not find anything equivalent to "pass" or "return"
statement in Haskell. Presently I have got a workaround. I am doing it by
putting a dummy print as described below.

can anybody help me in this?

f some_params =
       if some_condition
          then do putStr "Hacky way to do nothing!"
          else do perform_some_IO
                       f some_other_params

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070220/57a5f09b/attachment.htm

More information about the Haskell-Cafe mailing list