Last change
on this file since 2049 was
1602,
checked in by orlov, 16 years ago
|
- Test for applying fall-back functions.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
463 bytes
|
Line | |
---|
1 | $use Apply Arithm StdIO; |
---|
2 | |
---|
3 | |
---|
4 | $func Filter s.Fname e.Fargs (e.list) = e.new-list; |
---|
5 | |
---|
6 | Filter s.Fname e.Fargs (e.list) = |
---|
7 | () e.list $iter { |
---|
8 | e.list : t.item e.rest, { |
---|
9 | <Apply s.Fname e.Fargs t.item> : e = |
---|
10 | (e.new-list t.item) e.rest; |
---|
11 | (e.new-list) e.rest; |
---|
12 | }; |
---|
13 | } :: (e.new-list) e.list, |
---|
14 | e.list : /*empty*/ = |
---|
15 | e.new-list; |
---|
16 | |
---|
17 | |
---|
18 | $func? Div? s.n s.k = ; |
---|
19 | |
---|
20 | Div? s.n s.k = <Rem s.k s.n> : 0; |
---|
21 | |
---|
22 | Main = <WriteLN <Filter &Div? 3 (1 2 3 4 5 6 7 8 9 10)>>; |
---|
23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.