Exposes function composition (++) and function composition with two
arguments (+++) to the Fun module of our extended standard library.
Adds and exposes function application ($).

Signed-off-by: Matthias Görgens <[email protected]>


 stdext/fun.ml  |  2 ++
 stdext/fun.mli |  3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)


# HG changeset patch
# User Matthias Görgens <[email protected]>
# Date 1265125333 0
# Node ID 93721338057fdff1465e54be45bd282fd1af0de0
# Parent  432886e652a04649ea133f63d1010b2e15e0b169
Module Fun gets operators for function composition and application.

Exposes function composition (++) and function composition with two
arguments (+++) to the Fun module of our extended standard library.
Adds and exposes function application ($).

Signed-off-by: Matthias Görgens <[email protected]>

diff -r 432886e652a0 -r 93721338057f stdext/fun.ml
--- a/stdext/fun.ml
+++ b/stdext/fun.ml
@@ -16,3 +16,5 @@
 
 let comp2  f g a b = ((++) ++ (++)) f g a b
 let (+++) f g a b = comp2 f g a b
+
+let ($) f a = f a
diff -r 432886e652a0 -r 93721338057f stdext/fun.mli
--- a/stdext/fun.mli
+++ b/stdext/fun.mli
@@ -4,3 +4,6 @@
 val flip : ('a -> 'b -> 'c) -> ('b -> 'a -> 'c)
 val on : ('b -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'a -> 'c
 val comp : ('b -> 'c) -> ('a -> 'b) -> ('a -> 'c)
+val (+++) : ('c -> 'd) -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'd
+val (++) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c
+val ($) : ('a -> 'b) -> 'a -> 'b
\ No newline at end of file
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to