3 ms·
You probably need at least one WriteJSON that's synchronous and one that's asynchronous, with different colors. If you want a version that uses memoization inte
by anonymoushn 5y ago
You probably need at least one WriteJSON that's synchronous and one that's asynchronous, with different colors. If you want a version that uses memoization internally, it needs the "can allocate memory" color, which is independent of the async/sync color.
- virchau13 5y agoCould it be possible to infer optional colors from the environment? You denote that the color is optional in the function's type signature, and inside the body of the function, you have a construct that lets you execute different code depending on the state of the function's colors. The call site could either automatically infer the colors used or the colors used could be manually specified. Basically a type parameter with compile-time if statements.
- xigoi 5y agoSo, algebraic effects?