Permalink
Browse files

Added ternary.hs. Way old.

  • Loading branch information...
1 parent b13d1e9 commit 358c32f50c19670f34653361026a9d4eddedb0b2 @duckinator committed Oct 30, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 ternary.hs
View
@@ -0,0 +1,9 @@
+infixr 1 ?
+True ? x = const x
+False ? _ = id
+
+
+x = True ? "ohai" $ "obai"
+y = False ? "ohai" $ "obai"
+main = do putStrLn x
+ putStrLn y

0 comments on commit 358c32f

Please sign in to comment.