A monad that captures the result of a function call or an error if it was not
successful. Railway programming, enabled by this type, can be a nicer
alternative to traditional exception throwing because it allows functions to
declare all known errors with static types and then check for them
exhaustively in application code. Thrown exception have a type of unknown
and break out of regular control flow of programs making them harder to
inspect and more verbose work with due to try-catch blocks.
A monad that captures the result of a function call or an error if it was not successful. Railway programming, enabled by this type, can be a nicer alternative to traditional exception throwing because it allows functions to declare all known errors with static types and then check for them exhaustively in application code. Thrown exception have a type of
unknownand break out of regular control flow of programs making them harder to inspect and more verbose work with due to try-catch blocks.