aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorEduardo Julian2019-02-04 19:38:19 -0400
committerEduardo Julian2019-02-04 19:38:19 -0400
commitcb4beecbbc4ab3ec918ab640ffb621036707678f (patch)
tree5c6351067aad4d29f4dca059cbc3e69862ad2dde /stdlib
parent41d34484cf6e0123bc8152251650423a6c8ba098 (diff)
Fixed a bug in how the "_$" macro works.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux9
1 files changed, 8 insertions, 1 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index 334632272..1a35b4ebd 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -1574,6 +1574,13 @@
(form$ (list op a1 a2))}
op))
+(def:''' (function/flip func)
+ #Nil
+ (All [a b c]
+ (-> (-> a b c) (-> b a c)))
+ (function' [right left]
+ (func left right)))
+
(macro:' #export (_$ tokens)
(#Cons [(tag$ ["lux" "doc"])
(text$ ("lux text concat"
@@ -1586,7 +1593,7 @@
#Nil)
({(#Cons op tokens')
({(#Cons first nexts)
- (return (list (list/fold (_$_joiner op) first nexts)))
+ (return (list (list/fold (function/flip (_$_joiner op)) first nexts)))
_
(fail "Wrong syntax for _$")}