MoonScript Configuration Syntax

Configuration Example

The MoonScript configuration builder syntax uses function calls to define
variables. The advantage to this approach over using a Lua table literal is
that you can have logic surrounding your assignments. You can also freely mix
regular table objects.

Here’s an example of the configuration DSL (domain specific language) and the
table it generates:

some_function=->steak"medium_well"config"development",->hello"world"if20>4color"blue"elsecolor"green"custom_settings->age10enabledtrue-- tables are mergedextra->name"leaf"mood"happy"extra->name"beef"shoe_size12includesome_functionincludesome_function-- a normal table can be passed instead of a functionsome_list{1,2,3,4}-- use set to assign names that are unavailableset"include","hello"