Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,2 @@
when :: Monad m => m () -> Bool -> m ()
action `when` condition = if condition then action else return ()

View file

@ -0,0 +1,2 @@
func a b x = (x + y) / y
where y = a * b

View file

@ -0,0 +1,3 @@
func a b x =
let y = a * b in
(x + y) / y

View file

@ -0,0 +1,16 @@
import Data.Bool (bool)
main :: IO ()
main = do
let raining = False
putStrLn $ bool "No need" "UMBRELLA !" raining
putStrLn $ flip bool "No need" "UMBRELLA !" raining
putStrLn "\n--------\n"
mapM_ putStrLn $
[bool, flip bool]
<*> ["No need"]
<*> ["UMBRELLA !"]
<*> [raining, not raining]