Forward composition
See original GitHub issueSorry to bother with this again, but I’d love to see forward composition in coconut, I am already using coconut as default python language and there are things I miss from other functional language like forward composition. See >> in Elm.
Id like this expression
k = f .. g .. h
be equivalent to
k = h |>> g |>> f
I’d guess its not that hard to implement since you can just transform it into the ..
notation and continue from there. If I may, continuing the idea of |*>
you can even add the |*>>
operator to unpack the output or one function as arguments into the next function.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Forward Composition Propagation for Explainable Neural ...
This paper proposes an algorithm called Forward Composition Propagation (FCP) to explain the predictions of feed-forward neural networks ...
Read more >Function composition - Wikipedia
In mathematics, function composition is an operation ∘ that takes two functions f and g, and produces a function h = g ∘...
Read more >Lesson 23. Composition and forwarding - liveBook · Manning
Composition is a technique of breaking large structures down into small structures and putting them together. · Embedding gives access to the fields...
Read more >Forward Pipe vs Composition - Ben Collins
The forward pipe operator and the composition operator are conceptually very similar, but are best suited for different scenarios.
Read more >Functional C# – Forward Functional Composition
Both forward application and composition is quite important in the functional programming world. First, let's tackle the forward application ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Excellent! So happy with coconut, all my serious projects are now written in it.
@cgarciae I definitely understand the rational for function composition in the opposite direction. I’m putting this on the
v1.3.0
milestone, although I’m not sure yet what the syntax will look like.