Viewing profile — cleue
cleue
HN member- Joined
- Tue, Aug 22, 2023, 8:47 PM UTC
- HN karma
- 1
- Public activity
- 8 items
- HN profile
- View on Hacker News ↗
About cleue
No profile information was provided.
Recent public activity
-
comment
Comment #37228915
This is also one of my favorites, but it can get even more verbose. However this is how the go type system is designed to work with covariance. Without the `~` operator these funct…
-
comment
Comment #37228828
1) I would argue that with fp style you might want to structure your code into small, pure functions, anyway, for testability reasons. Also many functions from the go library are a…
-
comment
Comment #37228711
Because in some cases the aspect whether or not the language is functional is not the only decision criteria for the choice of language. If it was, I would absolutely recommend to …
-
comment
Comment #37228662
Unfortunately there is no way to use variadic arguments in a type safe way in go (yet) - except for the special case that all arguments are of the same type. This is why some of th…
-
comment
Comment #37228615
The example actually does handle all errors, because the values are of type `Either` and the composition functions take this into account. If you would like to handle a particular …
-
comment
Comment #37228594
I agree that the code will become unreadable as soon as you try to use inline functions (since there are no lambda expressions). However, the fp style (independent of this library)…
-
comment
Comment #37228515
One of the design aspects is to make a distinction between functions with and without side effects (pure). In a way to tell these apart by looking at the function signature without…
-
comment
Comment #37228436
There exist at least some examples as part of the go docs, e.g. here https://pkg.go.dev/github.com/IBM/fp-go/either#pkg-examples or https://pkg.go.dev/github.com/IBM/fp-go@v1.0.19/…