Last change
on this file since 2037 was
2037,
checked in by orlov, 15 years ago
|
- Added List.Replicate function.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.1 KB
|
Line | |
---|
1 | // $Source$ |
---|
2 | // $Revision: 2037 $ |
---|
3 | // $Date: 2006-07-27 12:45:55 +0000 (Thu, 27 Jul 2006) $ |
---|
4 | |
---|
5 | $func Zip (e.list1) (e.list2) = e.new-list; |
---|
6 | |
---|
7 | $func Map s.Fname e.Fargs (e.list) = e.new-list; |
---|
8 | |
---|
9 | $func Filter s.Fname e.Fargs (e.list) = e.new-list; |
---|
10 | |
---|
11 | $func Split s.Fname e.Fargs (e.list) = (e.true-list) (e.false-list); |
---|
12 | |
---|
13 | $func? Elem? e.list t.item = ; |
---|
14 | |
---|
15 | $func Get-Elem s.num (e.list) = term; |
---|
16 | |
---|
17 | $func Foldr s.Fname e.Fargs (e.value) (e.list) = e.value; |
---|
18 | |
---|
19 | $func Foldr1 s.Fname e.Fargs (e.list) = e.value; |
---|
20 | |
---|
21 | $func Concat e.lists = e.list; |
---|
22 | |
---|
23 | $func Paren exprs = e.lists; |
---|
24 | |
---|
25 | $func Reverse e.list = e.rev-list; |
---|
26 | |
---|
27 | $func Intersperse (e.sep) e.list = e.new-list; |
---|
28 | |
---|
29 | $func Nub e.expr = e.selected; |
---|
30 | |
---|
31 | $func Replicate s.n e.expr = e.list; |
---|
32 | |
---|
33 | // Returns number of e.expr entries in e.source and e.source without all e.expr's. |
---|
34 | $func Entries e.expr (e.source) = s.num e.res; |
---|
35 | |
---|
36 | // Add to the first list all new elements from the second one. |
---|
37 | $func Or (e.list1) e.list2 = e.or; |
---|
38 | |
---|
39 | // Choose from the first list all elements present in the second one. |
---|
40 | $func And (e.list1) e.list2 = e.and; |
---|
41 | |
---|
42 | // Choose from the first list all elements not present in the second one. |
---|
43 | $func Sub (e.list1) e.list2 = e.not; |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.