libfn / functional

Extending C++ library for functional programming
ISC License
60 stars 8 forks source link

Incomplete support for graded monad in `expected` #98

Open Bronek opened 5 days ago

Bronek commented 5 days ago

Currently expected only supports type-calculation of the graded monad only if either side of the expected (that is value or error) agrees with the fixed type. This is not correct; graded monad support needs to work also if both types do not match, as long as they are the sum-of-types kind of type.