DrKillshot / unwrap

A functional programming library for typescript developers
https://drkillshot.github.io/unwrap/
1 stars 1 forks source link

Add .throw() to Either monad #24

Closed DrKillshot closed 5 hours ago

DrKillshot commented 3 days ago

The either container allows the code base to remain free from throwing. However, in some situations, throwing might be needed. Add an Either.throw() which throws the error contained in the Either and does nothing otherwise