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

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