8 ms·
Code reuse search engines is something that Haskell is excellent for. With Hoogle you can search for a generic type signature and probably find the method you w
by CountHackulus 7y ago
Code reuse search engines is something that Haskell is excellent for. With Hoogle you can search for a generic type signature and probably find the method you want.
Want to flatten an array of Maybes? Just search for [Maybe a] -> [a] and you'll find catMaybes and takeWhileJust.
This of course only works for Haskell because so much of a function is determined by it's types. Doing this sort of thing in say JavaScript would be an absolute nightmare. Still, it's an interesting train of thought.