From f8937f600f797fe82b346dfeffa954bcc5f47972 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 5 Nov 2024 16:27:50 +0100 Subject: Prefer built-in "nub_left" Now that justbuild 1.4 is available, the workaround of defining "nub_left" in terms of "reverse" and "nub_right" is no longer necessary. --- rules/EXPRESSIONS | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'rules/EXPRESSIONS') diff --git a/rules/EXPRESSIONS b/rules/EXPRESSIONS index 52a381fb..b974026e 100644 --- a/rules/EXPRESSIONS +++ b/rules/EXPRESSIONS @@ -226,18 +226,4 @@ } } } -, "nub_left": - { "doc": ["Removes all but the leftmost duplicate from the list."] - , "vars": ["list"] - , "vars_doc": {"list": ["The list to remove duplicates from."]} - , "expression": - { "type": "let*" - , "bindings": - [ ["list", {"type": "reverse", "$1": {"type": "var", "name": "list"}}] - , ["list", {"type": "nub_right", "$1": {"type": "var", "name": "list"}}] - , ["list", {"type": "reverse", "$1": {"type": "var", "name": "list"}}] - ] - , "body": {"type": "var", "name": "list"} - } - } } -- cgit v1.2.3