StdGeneric.icl.patch 706 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- StdGeneric.icl	2018-12-17 02:43:55.000000000 +0100
+++ StdGeneric.icl	2018-12-17 11:06:09.196234236 +0100
@@ -21,6 +21,23 @@
 
 bimap{|(->)|} _ ba fr _ f = comp3 fr f ba
 
+binumap{|c|} x = x
+
+binumap{|PAIR|} fx _ fy _ (PAIR x y) = PAIR (fx x) (fy y)
+
+binumap{|EITHER|} fl _ fr _ (LEFT x) 	= LEFT (fl x)
+binumap{|EITHER|} fl _ fr _ (RIGHT x)	= RIGHT (fr x)
+
+binumap{|CONS|} fx _ (CONS x) = CONS (fx x)
+
+binumap{|RECORD|} fx _ (RECORD x) = RECORD (fx x)
+
+binumap{|FIELD|} fx _ (FIELD x) = FIELD (fx x)
+
+binumap{|OBJECT|} fx _ (OBJECT x) = OBJECT (fx x)
+
+binumap{|(->)|} _ ba fr _ f = comp3 fr f ba
+
 comp3 :: !(.a -> .b) u:(.c -> .a) !(.d -> .c) -> u:(.d -> .b)
 comp3 f g h
 	| is_id f