lua-users home
lua-l archive

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

On Thu, Jun 5, 2014 at 12:07 AM, steve donovan
<> wrote:

> sort(cities) do (x,y: string) -> int:
>   cmp(x.len, y.len)

On a related note, sometimes I wish Lua allowed putting an operator in
place of where a function would be expected.  Something like:
table.sort(some_table, <)

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.