From 9f61e7f90d4729a9afba1c08d6ce45af460e5d8f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 19 Oct 2017 18:56:42 -0700 Subject: Misc. cleanups. --- lib/collections.nom | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/collections.nom') 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})" -- cgit v1.2.3