Re: [go-nuts] Tacit Golang?

2022-04-03 Thread Sam Hughes
You’re not far, but a couple corrections: 1. While a decent, native “compose” function would skip straight to point B, and as such would also accomplish point A, even with generics this is cumbersome. 2. Point A describes implementation of an infix pipe-operator, something implemented by nature

Re: [go-nuts] Tacit Golang?

2022-04-02 Thread Bakul Shah
If I understand you right, you seem to want to use "<-" as the "compose" higher order function but as an infix operator. That is, instead of "value := F(G(args...))", you want to be able to write "value := (F <- G)(args...)". Further, "F <- G <- H" means "F <- (G <- H)". F, G are functions

[go-nuts] Tacit Golang?

2022-04-01 Thread Sam Hughes
Point-free programming, or "tacit programming", is a convention that highlights the intent without syntactic noise. For those unfamiliar, wikipedia: https://en.wikipedia.org/wiki/Tacit_programming I want better function composition. "Write a helper function to route values out to values in,