diff options
author | dos-reis <gdr@axiomatics.org> | 2013-05-21 19:08:40 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-05-21 19:08:40 +0000 |
commit | 4d2e40994f313341a18c6a488826e5c79ed0ee6b (patch) | |
tree | 75032de59781ff2f5c620dfe4414c22234d1ffb4 /src/algebra/list.spad.pamphlet | |
parent | 547ab00c39512aa5d0909e182c12e930fbc9277a (diff) | |
download | open-axiom-4d2e40994f313341a18c6a488826e5c79ed0ee6b.tar.gz |
* algebra/aggcat.spad.pamphlet (UnaryRecursiveAggregate) [map!]:
Implement default.
* algebra/list.spad.pamphlet (List) [map!]: Likewise.
Diffstat (limited to 'src/algebra/list.spad.pamphlet')
-rw-r--r-- | src/algebra/list.spad.pamphlet | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet index 6ceb30fa..2bf3a01d 100644 --- a/src/algebra/list.spad.pamphlet +++ b/src/algebra/list.spad.pamphlet @@ -253,6 +253,13 @@ List(S:Type): Exports == Implementation where convert concat(convert('construct)@InputForm, [convert a for a in (x pretend List S)]$List(InputForm)) + map!(f,x) == + y := x + while not empty? y repeat + y.first := f(y.first) + y := rest y + x + @ \section{package LIST2 ListFunctions2} |