4 ms·
Yes. It's done during compile time and trivial to do. Changing the function signature is significantly harder. You'd either have to inline the function, evalua
by diolang 6y ago
Yes. It's done during compile time and trivial to do.
Changing the function signature is significantly harder. You'd either have to inline the function, evaluate the code, run optimizations to remove the Either wrapping or you can have a more specialize simple check and have two version of the function. One with the standard signature and one that doesn't use Either and modifies the function to not use it.
Having one function signature which you don't need to modify is significantly more simple than applying several optimizations to undo wrapping and not break anything