Hacker News new | ask | show | jobs
by catnaroek 3669 days ago
If anything, the problem with the given code snippets is that the code is needlessly cluttered by explicit type annotations for trivial things. Unfolding a lazy sequence is a short and sweet affair in Haskell and even ML (which doesn't enjoy the benefit of piggybacking on built-in lazy evaluation), where you only supply type annotations when inference can't possibly work (e.g., polymorphic recursion, which most code doesn't need).