RosettaCodeData/Task/Inverted-syntax/Haskell/inverted-syntax-1.hs
2023-07-01 13:44:08 -04:00

2 lines
106 B
Haskell

when :: Monad m => m () -> Bool -> m ()
action `when` condition = if condition then action else return ()