This already exists in Coconut:
http://coconut.readthedocs.io/en/master/HELP.html#function-composition
From http://coconut-lang.org/:
> Coconut is a functional programming language that compiles to Python.
> Since all valid Python is valid Coconut, using Coconut will only extend
> and enhance
On 27 October 2017 at 02:23, Chris Barker wrote:
>
>
> On Thu, Oct 26, 2017 at 6:32 AM, Paul Moore wrote:
>
>>
>> Procedural languages, and Python in particular, simply don't work like
>> that. Functions have arbitrary numbers of arguments,
>
>
> And
On Thu, Oct 26, 2017 at 6:32 AM, Paul Moore wrote:
>
> Procedural languages, and Python in particular, simply don't work like
> that. Functions have arbitrary numbers of arguments,
And can return an arbitrary number of values. OK, technically a single
tuple of values, but
Expanding on the comments of the OP (to give more information, not
necessarily to support or be against it):
The "$" operator in Haskell is not a composition operator, it's essentially
the same as python's apply builtin (the python2 builtin, removed for python
3), but with an operator syntax; the
On 2017-10-26 13:06, Yan Pas wrote:
> I've looked up this feature in haskell. Dollar sign operator is used to
> avoid parentheses.
>
> Rationalle:
> Python tends to use functions instead of methods ( e.g.len([1,2,3])
> instead of [1,2,3].len() ). Sometimes the expression inside parentheses
> may
On 26/10/17 12:06, Yan Pas wrote:
I've looked up this feature in haskell. Dollar sign operator is used to
avoid parentheses.
If I understand your example correctly, it does no such thing. "A $ B"
appears to mean "apply callable A to object B", at least the way you
portray it below. I don't
Why not a functional syntax, i.e.
compose(f, g, h)
rather than f $ g $ h
Advantage: you can do it today.
Without need to convince Guido to add more line noise to the language.
https://gist.github.com/stephanh42/6c9158c2470832a675fad7658048be9d
Stephan
2017-10-26 13:06 GMT+02:00 Yan Pas
I've looked up this feature in haskell. Dollar sign operator is used to
avoid parentheses.
Rationalle:
Python tends to use functions instead of methods ( e.g. len([1,2,3])
instead of [1,2,3].len() ). Sometimes the expression inside parentheses may
become big and using a lot of parentheses may