aboutsummaryrefslogtreecommitdiff
path: root/src/boot/utility.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-24 03:23:59 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-24 03:23:59 +0000
commitfbcb9ebe438100f7a549329ae14668cd27fde508 (patch)
treeea4ac9322ecca78bc976418a33677cf8ec88b6d0 /src/boot/utility.boot
parent698aa5abf97234248cf7f59216759d9cc0d2290b (diff)
downloadopen-axiom-fbcb9ebe438100f7a549329ae14668cd27fde508.tar.gz
* boot/tokens.boot: "@" is now a new keyword.
* boot/ast.boot (bfRestrict): New. (bpTyped): Rename from bpTagged. Accept type restriction. * boot/utility.boot (drop): Restrict the result to a %List.
Diffstat (limited to 'src/boot/utility.boot')
-rw-r--r--src/boot/utility.boot5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/boot/utility.boot b/src/boot/utility.boot
index 294f9d71..42bbbf00 100644
--- a/src/boot/utility.boot
+++ b/src/boot/utility.boot
@@ -107,9 +107,8 @@ takeWhile(f,l) ==
++ If `n' is negative, drop from the end.
drop(n,l) ==
n >= 0 =>
- while n > 0 and l is [.,:l] repeat
- n := n - 1
- l
+ for . in 1..n while l is [.,:l] repeat nil
+ l@%List(%Thing)
take(#l+n,l)
copyTree t ==