lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jun 5, 2014 at 9:18 AM, Coroutines <coroutines@gmail.com> wrote:
> I don't know how that could be made less confusing from the parsers'
> perspective, though.  I think you can do this in Haskell with \+ to
> refer to the function of the operator itself.

Nimrod resolves this issue by backquotes: `<` (which is also the form
used to define an operator as a function)

A bit hacky, but pl.List allows quoted operator strings in place of functions:

> ls = List{10,2,5,20}
> = ls:sorted '<'
{2,5,10,20}
> = ls:sorted '>'
{20,10,5,2}