User Defined Operator Blocks

Glee User Defined Operators are named blocks. That means they are simply blocks (i.e. chunks of code surrounded by braces {}) which have been given names so they can be found in a namespace and reused. Additionally, they are contrasted from Programs which are also named blocks. The difference is that programs take a namespace as a left argument. Operator Blocks have their left and right arguments delivered into a namespace with the names "L__" and "R__" respectively. There are many many subtle issues. I think the only way to deal with the subtleties is to thoroughly describe how the interpreter works with these blocks. With that knowledge you can deduce behavior characteristics not specifically given by examples. This will take some iterating on my part as users make their confusions known to me.

Commentary Code Result
Commentary 'minus'#op{l__-r__};
'div'#op{l__/r__};
3 minus 5 div 4$;
_0.5
Commentary 'minus'#op{
  :if(r__* =1){'dyadic'$;l__-r__}
  :elseif(l__* =1){'monadic'$;l__-}
  :else{'niladic'$;#nil} };
10 minus 20$;
5 minus$;
minus $;
dyadic
_10
monadic
_5
niladic