summaryrefslogtreecommitdiff
path: root/EXPRESSIONS
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-11-05 16:27:50 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-11-06 14:37:16 +0100
commit9e7f2b68357dc1fbd073244e5a242a8317c8207d (patch)
tree971c37e846264da99390077e270b07daf7014caa /EXPRESSIONS
parent197a35703d1ced53f71d6137b9133d2558d888d4 (diff)
downloadrules-cc-9e7f2b68357dc1fbd073244e5a242a8317c8207d.tar.gz
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.
Diffstat (limited to 'EXPRESSIONS')
-rw-r--r--EXPRESSIONS14
1 files changed, 0 insertions, 14 deletions
diff --git a/EXPRESSIONS b/EXPRESSIONS
index 52a381f..b974026 100644
--- a/EXPRESSIONS
+++ b/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"}
- }
- }
}