From e2490546fe9937d43b87c0432b967824dd0f90c7 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 11 Mar 2020 00:31:43 +0800 Subject: update. --- spec/inputs/macro.moon | 3 ++- spec/inputs/macro_export.moon | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/inputs/macro.moon b/spec/inputs/macro.moon index eb1e224..db03a10 100644 --- a/spec/inputs/macro.moon +++ b/spec/inputs/macro.moon @@ -61,9 +61,10 @@ macro expr pipe = (...)-> $foreach $filter($map({1,2,3}, _ * 2), _ > 4), print _ -print $pipe( +val = $pipe( {1, 2, 3} $map(_ * 2) $filter(_ > 4) $reduce(0, _1 + _2) ) + diff --git a/spec/inputs/macro_export.moon b/spec/inputs/macro_export.moon index 369b83b..759c6d1 100644 --- a/spec/inputs/macro_export.moon +++ b/spec/inputs/macro_export.moon @@ -7,7 +7,7 @@ export macro expr showMacro = (name,res)-> if debugMacro "do txt = #{res} - print '['..#{name}..']' + print '[macro '..#{name}..']' print txt txt" else -- cgit v1.2.3-55-g6feb