Jump to content

Inverted syntax: Difference between revisions

m
→‎{{header|Haskell}}: Expanded example
(→‎{{header|Haskell}}: Added a Data.Bool.bool example.)
m (→‎{{header|Haskell}}: Expanded example)
Line 533:
 
main :: IO ()
main = do
let raining = False
in putStrLn $ bool "No need" "UMBRELLA !" raining</lang>
putStrLn $ (flip bool) "No need" "UMBRELLA !" raining</lang>
{{Out}}
<pre>No need</pre>
UMBRELLA !</pre>
 
=={{header|Icon}} and {{header|Unicon}}==
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.