4 ms·
I don't know, what he seems to want to do can be expressed in haskell as doesFileExist "file" >>= \exists -> if exists then ... else ... W
by rchowe 16y ago
I don't know, what he seems to want to do can be expressed in haskell as
doesFileExist "file" >>= \exists -> if exists
then ...
else ...
When he writes (do (>>= ... in his lisp example I don't think that he understands that do is just syntactic sugar for >>=s and >>s, and that what's actually happening is the data is being "taken out" (for lack of a better term) of a monad.
His problem seems to be that you do have to bother with monadic IO when with a macro he can just write (mif cond ...) and be done with it.