2 ms·
A more stylistic pattern for this is to give the binding a type so that the coercion of the if/else expression works automatically instead of using `as`. Also,
by estebank 7y ago
A more stylistic pattern for this is to give the binding a type so that the coercion of the if/else expression works automatically instead of using `as`.
Also, there's work being done so that this won't be needed by deferring evaluation of expressions until the whole body has already been evaluated so that inference with the naïve code will work at some unspecified time in the future.