diff options
Diffstat (limited to 'src/boot/utility.boot')
-rw-r--r-- | src/boot/utility.boot | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/boot/utility.boot b/src/boot/utility.boot index 70802e5a..139e98d0 100644 --- a/src/boot/utility.boot +++ b/src/boot/utility.boot @@ -48,7 +48,7 @@ module utility (objectMember?, symbolMember?, stringMember?, lastNode, append, append!, copyList, substitute, substitute!, setDifference, setUnion, setIntersection, symbolAssoc, applySubst, applySubst!, applySubstNQ, objectAssoc, - remove,removeSymbol,atomic?,finishLine) where + remove,removeSymbol,atomic?,copyTree,finishLine) where substitute: (%Thing,%Thing,%Thing) -> %Thing substitute!: (%Thing,%Thing,%Thing) -> %Thing append: (%List %Thing,%List %Thing) -> %List %Thing @@ -63,6 +63,7 @@ module utility (objectMember?, symbolMember?, stringMember?, setUnion: (%List %Thing,%List %Thing) -> %List %Thing setIntersection: (%List %Thing,%List %Thing) -> %List %Thing atomic?: %Thing -> %Boolean + copyTree: %Thing -> %Thing finishLine: %Thing -> %Void --FIXME: Next signature commented out because of GCL bugs -- firstNonblankPosition: (%String,%Short) -> %Maybe %Short @@ -76,6 +77,10 @@ module utility (objectMember?, symbolMember?, stringMember?, atomic? x == x isnt [.,:.] or x.op is 'QUOTE +copyTree t == + t is [.,:.] => [copyTree first t,:copyTree rest t] + t + --% membership operators objectMember?(x,l) == |