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

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