aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-02-03 11:53:21 -0400
committerEduardo Julian2019-02-03 11:53:21 -0400
commitcf9e3fa6fef24cc0828ab882661fa96dc6f2570d (patch)
tree082f91e8c84a72ace38a35b30a4acb61b8d27ab6 /stdlib/source/lux.lux
parent700f82c940794684cbce9535274f6d7ea3f9c692 (diff)
Some refactoring around the identity function.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux9
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)]