From c4556457629bebbb632dbf4e87a49e2d684697c2 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sat, 21 Mar 2020 12:42:44 +0800 Subject: update readme. --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42da196..319e821 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,7 @@ $config! -- file 'main.moon' import 'macro' as {:$config, :$assert, :$asserts} -macro expr and = (...)-> - "#{ table.concat {...}, ' and ' }" +macro expr and = (...)-> "#{ table.concat {...}, ' and ' }" $asserts item ~= nil $config false @@ -96,6 +95,7 @@ export map = (items, func)-> [func item for item in *items] export filter = (items, func)-> [item for item in *items when func item] -- file 'main.moon' +import 'Config' as {:flag, :value} import 'Utils' as {:map, :filter} ``` Compiles to: @@ -139,6 +139,11 @@ _module_0["filter"] = filter return _module_0 -- file 'main.moon' +local flag, value +do + local _obj_0 = require('Config') + flag, value = _obj_0.flag, _obj_0.value +end local map, filter do local _obj_0 = require('Utils') -- cgit v1.2.3-55-g6feb