3 ms·
Ah, there it is. OK, so I'm still confused. > you can get the same functionality (in a better / more consistent way) using library types RETURN is a control
by lisper 11y ago
Ah, there it is. OK, so I'm still confused.
> you can get the same functionality (in a better / more consistent way) using library types
RETURN is a control construct. How do you emulate a control construct using types?
- lmm 11y agoIn a language with first-class functions, control constructs can be replaced by polymorphic methods - see smalltalk for the ultimate version of this. In scala the idiomatic way to do "short-circuit the rest of this in some cases" is usually for/yield with a type like scalaz's \/.