3 ms·
Arguably, from a type-radical perspective, this is often because types were not specific enough. In the first case, the problem is quite obvious from the fact t
by valyagolev 5y ago
Arguably, from a type-radical perspective, this is often because types were not specific enough. In the first case, the problem is quite obvious from the fact that genAp doesn’t ask for Gen t (or something else that would guide it into generating forms of t). (Of course, Haskell’s type-system and libraries are not at the level of expressiveness to make perfect type signatures always easy)
Now, in the second case, the problem IMO is mixed logic/duplication in ‘maybe spawn (killThread $> spawn) oldId‘. How about ‘ forM_ oldId killThread’, followed by spawn?