Closed shilkazx closed 2 months ago
Implicit partials are intended to be for simple, straightforward operations that can't easily be built out of other operations, not to replace lambdas completely. That being said, Coconut does actually have an easy way to write this without using a lambda (this style is known as point-free programming) using the lift
built-in:
>>> [0, 1] |> lift(+)(.[1], .[0])
1
or:
>>> [0, 1] |> .[1] `lift(+)` .[0]
1
Oh, it does implement the feature but using 'lift' under such circumstances is weirder and more cumbersome than implicit lambda. Anyway, thanks for your good advice and I really love coconut.
Allow multiple reference of implicit partial. What we can do is:
But we can't do this:
A nagging crossover could work, but why not improve the implicit partial: