I know, this thing was an open an shut case in ramda.js (ramda/ramda#1317) and it would be much nicer to handle this kind of control flow with a Maybe type. But since no such thin exists in python afaik, how about we sidestep and implement something like this anyway?
def raise(e):
def foo(*_):
raise(e)
return foo
I for sure would find it useful.
Cheers!
I know, this thing was an open an shut case in ramda.js (ramda/ramda#1317) and it would be much nicer to handle this kind of control flow with a
Maybetype. But since no such thin exists in python afaik, how about we sidestep and implement something like this anyway?I for sure would find it useful.
Cheers!