by tombert · 2y ago · 0 comments
I don't know that there's a clean way to do the Either monad in Java without algebraic data types. You could certainly make a wrapper class that maybe has an optional `Left` and `Right` private variable and then make a `map` that handles the unboxing of those, but I think that might be a bit messy.
Don't worry, I won't deploy it until my team has seen it ;)