diff options
author | Eduardo Julian | 2019-02-03 11:53:21 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-02-03 11:53:21 -0400 |
commit | cf9e3fa6fef24cc0828ab882661fa96dc6f2570d (patch) | |
tree | 082f91e8c84a72ace38a35b30a4acb61b8d27ab6 /stdlib/source/lux.lux | |
parent | 700f82c940794684cbce9535274f6d7ea3f9c692 (diff) |
Some refactoring around the identity function.
Diffstat (limited to 'stdlib/source/lux.lux')
-rw-r--r-- | stdlib/source/lux.lux | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index d3a0f1825..b7de70c5d 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -3985,10 +3985,7 @@ #None (fail "Wrong syntax for structure:")))) -(def: #export (id x) - {#.doc "Identity function. Does nothing to it's argument and just returns it."} - (All [a] (-> a a)) - x) +(def: (identity x) (All [a] (-> a a)) x) (macro: #export (type: tokens) {#.doc (text$ ($_ "lux text concat" @@ -5302,8 +5299,8 @@ <open> parts-text <close>)])) - ([#Form "(" ")" id] - [#Tuple "[" "]" id] + ([#Form "(" ")" ..identity] + [#Tuple "[" "]" ..identity] [#Record "{" "}" rejoin-all-pairs]) [new-cursor (#Rev value)] |