-- non primitive if-then-else
data Then a = Then a
data Else a = Else a
then' :: a -> Then a
then' = Then
else' :: a -> Else a
else' = Else
if' :: Bool -> Then a -> Else a -> a
if' True (Then t) _ = t
if' False _ (Else f) = f
main = do
if' (4 < 3)
(then' $ print "foo")
(else' $ print "bar")
if' (4 > 3)
(then' $ print "baz")
(else' $ print "bat")