[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [OT] Swiftly return multiple values
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 5 Jun 2014 09:45:51 +0200
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}