ogma
ogma copied to clipboard
Add `\` overload handling calling a `Nil` def
This syntax would be useful for patterns such as append \+ $i.foo $i.bar
.
That is, where the +
is usually typed and will not work on an input such as TableRow
.
Typically, the pattern is append { let {get bar} $b | get foo | + $b }
.
Generalising this is tricky.
Implementation option
The \<cmd> arg1 arg2 ... argN
is sugar for an intrinsic, which will amount to let $i | \#n | <cmd> arg1 arg2 ... argN
.
This benefits from having <cmd>
be whatever is already defined, along with doing the let $i
portion.
The drawback is cmds (such as +
) would now need a Nil
input, which is going to place further burden on the inferencer.
- [ ] Bikeshed
$i
- [ ] #112