fork download
  1.  
  2. true = \t f -> t
  3. false = \t f -> f
  4.  
  5. toBool = \b -> b True False
  6.  
  7. bnot = flip
  8. bxor u v = \t f -> u (v f t) (v t f)
  9.  
  10.  
  11. main = do
  12. print $ map toBool [true, false, bnot true, bnot false, bnot (bnot false), bnot (bnot true), bxor true true, bxor true false, bxor false true, bxor false false, bxor (bnot (bnot true)) false]
Success #stdin #stdout 0s 4700KB
stdin
Standard input is empty
stdout
[True,False,False,True,False,True,False,True,True,False,True]