3 ms·
The `either` function is really crippled compared to a proper ternary operator; it works only for strings, and both `a` and `b` are evaluated at the call site,
by gnuvince 14y ago
The `either` function is really crippled compared to a proper ternary operator; it works only for strings, and both `a` and `b` are evaluated at the call site, so side effects in those expressions are out.
- rat87 14y agocough generics cough I suppose you could cast it, also use a Function literals for delayed evaluation.