2 ms·
function composition in js can be tricky to visually parse the "types" (especially if curried).
by platz 13y ago
function composition in js can be tricky to visually parse the "types" (especially if curried).
- kaonashi 13y agoIt depends on the return value, yes. I usually try to keep modules small and use some kind of threading (needle + thread analogy, not os threads/web workers) strategy when building functions -- pulling out common patterns into globally visible utility functions that work with common types (e.g. jQuery events/objects). It's not ideal, but in the absence of a true type system, it's all about mitigating potential problem areas.