(no title)
marcianx | 6 months ago
Most functional-inspired languages would just have a single `f: T -> Result<U, E>` interface, which supports both (1) a specific error type `E`, which can also be an uninhabited type (e.g. never type) for an infallible operation, and (2) where `U` can be the unit type if the function doesn't return anything on success. That's about as generic as one can get with a single "interface" type.
[1]: https://docs.spring.io/spring-framework/docs/current/javadoc...
No comments yet.