Haskell can typically figure out what you want for types (type declarations on functions are typically "make sure I didn't screw up" or "don't generalize too much"). Think of it of C++11's 'auto', but with the ability to use it pretty much everywhere if you want (argument types, template types, return values, etc.). And you wouldn't have to type 'auto'.
I'm pretty sure that (length :: [a] -> Int) is usually optimized better than a (genericLength :: (Num b) => [a] -> b).
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds