Created
July 30, 2022 19:30
-
-
Save onosendi/134aa0439a9f1c188d59a297a97bf70c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Eta reduce Found: foo2 xs = foldl (\ x acc -> acc + 1) 0 xs Why not: foo2 = foldl (\ x acc -> acc + 1) 0 | |
length1 xs = foldl (\x acc -> acc + 1) 0 xs | |
-- Ambiguous type variable ‘t0’ arising from a use of ‘foldl’ revents the constraint ‘(Foldable t0)’ from being solved. | |
length2 = foldl (\x acc -> acc + 1) 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment