4 ms·
Whatever that thrush thing is feels 10x more gross than the pipe
by rco8786 1y ago
Whatever that thrush thing is feels 10x more gross than the pipe
- svieira 1y agoThrush is the "T combinator" - I believe that the "Thrush" name comes from To Mock a Mockingbird by Raymond Smullyan [1]. [1]: https://www.amazon.com/Mock-Mockingbird-Other-Logic-Puzzles/dp/0192801422 https://www.amazon.com/Mock-Mockingbird-Other-Logic-Puzzles/... [2]: https://en.wikipedia.org/wiki/Combinatory_logic#In_computing https://en.wikipedia.org/wiki/Combinatory_logic#In_computing [3]: https://leanpub.com/combinators/read#leanpub-auto-the-thrush https://leanpub.com/combinators/read#leanpub-auto-the-thrush
- flexagoon 1y agoNot if you consider that the linked repo requires you to use asPipe on all functions first. So it's this: const greeting = thrush( 'hello', s => s.toUpperCase(), s => s + '!!!' ); Vs this: const upper = asPipe(s => s.toUpperCase()) const ex = asPipe((s) => s + '!!!') const greeting = pipe('hello') | upper | ex await greeting.run() (And that doesn't work in reality, as the top comment here notes)