question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Forward composition

See original GitHub issue

Sorry 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:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cgarciaecommented, Aug 17, 2017

Excellent! So happy with coconut, all my serious projects are now written in it.

1reaction
evhubcommented, Feb 18, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found