aboutsummaryrefslogtreecommitdiff
path: root/lib/collections.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-10-19 18:56:42 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-10-19 18:56:42 -0700
commit9f61e7f90d4729a9afba1c08d6ce45af460e5d8f (patch)
treec1bcc69f6ac8591b3c57b2d892d2e006bf9d5383 /lib/collections.nom
parent09cb00e106c809bb37eb7fd90e1a9d2dd7ec57bb (diff)
Misc. cleanups.
Diffstat (limited to 'lib/collections.nom')
-rw-r--r--lib/collections.nom2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/collections.nom b/lib/collections.nom
index 1d22bb6..c58d2f7 100644
--- a/lib/collections.nom
+++ b/lib/collections.nom
@@ -159,6 +159,8 @@ rule [%items sorted by %key] =:
%copy = (% for all %items)
sort %copy by %key
%copy
+rule [unique %items] =:
+ keys in (dict from entries ([%,yes] for all %items))
# Metatable stuff
compile [counter] to: "setmetatable({}, {__index=function() return 0; end})"