
Donn Cave
I think you're not the first to ask. Just out of curiosity, or is there a use for these variations?
Just that they seem to be natural generalizations. If it's just the single form of paramtrizing the condition, I think it's better served by a regular function, 'bool' or (??) or whatever.
The reason for the initially proposed construct seems clear enough to me, it's very much like `case'.
getargs >>= if then beTrue else beFalse . (==) ["-t"]
Isn't this equivalent, and only slightly more cumbersome? getArgs >>= case of {True -> beTrue; False -> beFalse} . (==) ["-t"] (And of course, getArgs >>= case of ["-t"] -> beTrue; _ -> beFalse is probably clearer anyway.) -k -- If I haven't seen further, it is by standing in the footprints of giants