t-shirt size: medium
- Type predicates: www.typescriptlang.org/docs/handboo...
- Assertion functions: www.typescriptlang.org/docs/handboo...
(I see these as superior to check-and-return because you don't need to define a new variable.)
- Type predicates: www.typescriptlang.org/docs/handboo...
- Assertion functions: www.typescriptlang.org/docs/handboo...
(I see these as superior to check-and-return because you don't need to define a new variable.)
if (someState !== null) {
// in here, someState is T, not T | null
}
Or
assert(someState !== null)
// now, someState is T, not T | null
if (someState !== null) {
// in here, someState is T, not T | null
}
Or
assert(someState !== null)
// now, someState is T, not T | null
but "I want to learn category theory" is kinda under-specified... there are different angles on it, with different focuses
(e.g., a mathematician's take is different from a computer-scientist's)
but "I want to learn category theory" is kinda under-specified... there are different angles on it, with different focuses
(e.g., a mathematician's take is different from a computer-scientist's)
But "commutative monad" may already be an answer to that part – it makes all toposorts of the DAG equivalent.
What's missing is concrete representation of intermediate values.
But "commutative monad" may already be an answer to that part – it makes all toposorts of the DAG equivalent.
What's missing is concrete representation of intermediate values.