Comment by wslh
1 year ago
I find this [1] from this [2]. Seems like a good explanation. It doesn't exist on Wikipedia though.
[1] https://github.com/raganwald-deprecated/homoiconic/blob/mast...
1 year ago
I find this [1] from this [2]. Seems like a good explanation. It doesn't exist on Wikipedia though.
[1] https://github.com/raganwald-deprecated/homoiconic/blob/mast...
A key thing to keep in mind is that the thrush combinator is a fancy name for a simple construct. The semantics it provides is a declarative form of traditional function composition.
For example, given the expression:
The same can be expressed in languages which support the "|>" infix operator as:
There are other, equivalent, constructs such as the Cats Arrow[0] type class available in Scala, the same Arrow[1] concept available in Haskell, and the `andThen` method commonly available in many modern programming languages.
0 - https://typelevel.org/cats/typeclasses/arrow.html
1 - https://wiki.haskell.org/Arrow_tutorial