blob: 5123f0e175480ab3893365bc60da086b348088f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{-# LANGUAGE RebindableSyntax #-}
module Main where
import Prelude
ifThenElse :: Int -> String -> String -> String
ifThenElse a b c = case a > 0 of
True -> b
False -> c
main :: IO ()
main = do
print $ if -5 then "this fails" else "this works"
print $ if 5 then "this works" else "this fails"
|