From cf9e3fa6fef24cc0828ab882661fa96dc6f2570d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 3 Feb 2019 11:53:21 -0400 Subject: Some refactoring around the identity function. --- stdlib/source/lux.lux | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'stdlib/source/lux.lux') 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 @@ parts-text )])) - ([#Form "(" ")" id] - [#Tuple "[" "]" id] + ([#Form "(" ")" ..identity] + [#Tuple "[" "]" ..identity] [#Record "{" "}" rejoin-all-pairs]) [new-cursor (#Rev value)] -- cgit v1.2.3