aboutsummaryrefslogtreecommitdiff
path: root/tests/collections.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-27 18:28:23 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-27 18:29:23 -0700
commit2e15c0fd5067318601e2f3b70ee6fc16ef58200d (patch)
tree0006e0825b2680d457bb531c3d079661b16d6bc8 /tests/collections.nom
parent6ce32bdd25694d71dc232c50a008f8824f8a75ce (diff)
Some tweaks/cleanup on the nomsu code as well as adding variable
mangling to 'parse % as %' to make almost hygienic macros.
Diffstat (limited to 'tests/collections.nom')
-rw-r--r--tests/collections.nom6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/collections.nom b/tests/collections.nom
index 04b8a78..6329d00 100644
--- a/tests/collections.nom
+++ b/tests/collections.nom
@@ -31,15 +31,15 @@ assume ((values in {x:1}) = [1])
%x <- [3,1,2]
sort %x
assume (%x = [1,2,3])
-sort %x by (-%)
+sort %x by % = (-%)
assume (%x = [3,2,1])
%keys <- {1:999,2:0,3:50}
-sort %x by (% in %keys)
+sort %x by % = %keys.%
assume (%x = [2,3,1])
assume ((unique [1,2,1,3,2,3]) = [1,2,3])
%c <- (new counter)
for % in ["x","y","x","x","y"]
- (% in %c) +<- 1
+ %c.% +<- 1
assume (%c = {x:3,y:2})
say "Collections test passed."