summaryrefslogtreecommitdiff
path: root/paper/While/Common.icl
diff options
context:
space:
mode:
authorCamil Staps2016-06-03 00:39:37 +0200
committerCamil Staps2016-06-03 00:39:37 +0200
commit6ecadcb8571712536f9d121264f67f30f7bb0147 (patch)
tree0542e10ca752f538195095713ca786ab494335b6 /paper/While/Common.icl
parentUpdate example program (diff)
First version almost finished
Diffstat (limited to 'paper/While/Common.icl')
-rw-r--r--paper/While/Common.icl3
1 files changed, 3 insertions, 0 deletions
diff --git a/paper/While/Common.icl b/paper/While/Common.icl
index 4f6e4c4..2c28933 100644
--- a/paper/While/Common.icl
+++ b/paper/While/Common.icl
@@ -28,6 +28,9 @@ where
($) infixr 0 :: (a -> b) a -> b
($) f x = f x
+(on) infix 0 :: (b -> c) (a a -> b) -> (a a -> c)
+(on) f g = \x y -> f (g x y)
+
(*>) infixl 4 :: (f a) (f b) -> f b | Applicative f
(*>) fa fb = const id <$> fa <*> fb