Why Nostr? What is Njump?
2024-10-19 22:52:04
in reply to

Gina Peter Banyard on Nostr: npub13w74a…vmktw npub1n3usu…5cnm2 Not really, you can implement some monads just ...

Not really, you can implement some monads just with generics (e.g. State, NonDeterminism) but if you want the Maybe/Option and Either/Result/Exception monads you need tagged unions.

If you *only* care about Monads for error handling, you can kinda get away with it with just tagged unions and without a generic bind operator.

I do wonder if having some sort of effect `function foo(): T!{error: E1}` to encode Midori's lightweight exception is a good idea.
Author Public Key
npub1rz3q6msmelwyh0r2qczh0gga95l3uvrhdejucafxn0awvhextxyqtlv5cr