aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-30 22:35:55 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-30 22:35:55 +0000
commit07fcfb463c0ea0ef40cc8886ee12c4dd20d9d759 (patch)
tree53c657a088647774a6387fc010ee7097f1bd7b26 /src/interp
parent42cf0984b569e49060252e536c0c7e7aee469873 (diff)
downloadopen-axiom-07fcfb463c0ea0ef40cc8886ee12c4dd20d9d759.tar.gz
* boot/ast.boot (bfAppend): Write in full.
* interp/ptrees.boot (pfAppend): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/ptrees.boot12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/interp/ptrees.boot b/src/interp/ptrees.boot
index cbd4ac4f..4ec6f7e5 100644
--- a/src/interp/ptrees.boot
+++ b/src/interp/ptrees.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2010, Gabriel Dos Reis.
+-- Copyright (C) 2007-2011, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,15 @@ structure %Ast ==
--% SPECIAL NODES
pfListOf x == pfTree('listOf,x)
pfListOf? x == pfAbSynOp?(x,'listOf)
-pfAppend list == apply(function append,list)
+pfAppend ls ==
+ ls isnt [l,:ls] => nil
+ r := copyList l
+ p := r
+ repeat
+ ls isnt [l,:ls] => return r
+ l = nil => nil
+ lastNode(p).rest := copyList l
+ p := rest p
pfNothing () == pfTree('nothing, [])
pfNothing? form == pfAbSynOp?(form, 'nothing)