source: to-imperative/trunk/java/refal/refal/plus/List.rfi @ 3990

Last change on this file since 3990 was 3990, checked in by yura, 12 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1// $Id: List.rfi 3990 2008-10-22 19:34:00Z yura $
2
3$module "refal.plus.List";
4
5$func Id e.expr = e.expr;
6
7$func? EqTerms t1 t2 = ;
8
9$func CompareTerms t1 t2 = s.Lt_or_Eq_or_Gt;
10
11$func Append (e.expr1) e.expr2 = e.expr2expr1;
12
13$func Zip (e.list1) (e.list2) = e.list;
14
15$func Unzip e.list = (e.list1) (e.list2);
16
17$func? Map s.func e.funcArgs (e.list) = e.list;
18
19$func? MapIn s.func e.funcArgs (e.list) = e.list;
20
21$func Filter s.func e.funcArgs (e.list) = e.list;
22
23$func Split s.func e.funcArgs (e.list) = (e.trueList) (e.falseList);
24
25$func? IsElem e.list t.item = ;
26
27$func Foldr s.func e.funcArgs (e.value) (e.list) = e.value;
28
29$func Foldr1 s.func e.funcArgs (e.list) = e.value;
30
31$func? All s.func e.funcArgs (e.list) = ;
32
33$func? Any s.func e.funcArgs (e.list) = ;
34
35$func Concat e.lists = e.list;
36
37$func Paren e.exprs = e.lists;
38
39$func Reverse e.list = e.list;
40
41$func Intersperse (e.sep) e.list = e.list;
42
43$func Separate (e.sep) e.list = e.listOfLists;
44
45$func Nub e.list = e.list;
46
47$func NubBy s.eqTerm e.list = e.list;
48
49$func Replicate s.n e.expr = e.list;
50
51$func QSort e.list = e.sorted_list;
52
53$func SortBy s.compare e.list = e.sorted_list;
54
55$func Sort e.list = e.sorted_list;
56
57// Returns number of e.expr entries in e.source and e.source without all e.expr's.
58// FIXME: Strange function!
59// Additionally it conflicts with Table.Entries.
60// Commented out at least until there is some sort of name conflicts resolution
61// strategy.
62// $func Entries e.expr (e.source) = s.num e.res;
63
64// Add to the first list all new elements from the second one.
65$func Or (e.list1) e.list2 = e.list;
66
67// Choose from the first list all elements present in the second one.
68$func And (e.list1) e.list2 = e.list;
69
70// Choose from the first list all elements not present in the second one.
71$func Sub (e.list1) e.list2 = e.list;
Note: See TracBrowser for help on using the repository browser.