These are chat archives for evhub/coconut
Somewhat thinking outloud... if you use a decorator to apply bind functionality, you can effectively drop in a
my_func(Right(value))) to recover the initial function. I could see how having functions that assume an
Either input might save on typing.
skip_on_error function seems a little odd to me for two reasons. I'm hoping you can call out if there's something I'm missing... . It looks like it's handling the map portion, applying the function only to
Right(val), but it passes the whole Either into the function that it wraps. It also doesn't guarantee
Either as a return type since the wrapped function is free to return any value it likes, so the output could easily be
typing.Union[T, Either]. Is there any advantage to these design choices?
Eitheras a return type is the right way to go. I'm not sure I understand your first point though. What would it ideally do instead of passing in the whole