Re: Please don't convert the result of __lt to a boolean?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Please don't convert the result of __lt to a boolean?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2017年10月14日 22:03:23 -0300
> This would be cool:
>
> v = f(x) <- g(y) <- h(z)
> v = v() -- v = result of f(x, g(y, h(z)))
Without the currying, one can this in Lua:
-- Mathematica style
debug.setmetatable(function () end,
{ __idiv = function (a,b) return b(a) end})
_ = 2 // math.sqrt // print
-- Unix pipe style
debug.setmetatable(function () end,
{ __bor = function (a,b) return b(a) end})
_ = 2 | math.sqrt | print