Open utterances-bot opened 1 year ago
Is there any widely applicable rule so that I don't come up with this inferior definition of zoop? It also matches all arguments, provably terminates and has the same type as foldr.
zoop abb b [] = b zoop abb b (a:as) = zoop abb (abb a b) as
@johannes-riecken you wrote foldl
, which is just as good!
Implement With Types, Not Your Brain! :: Reasonably Polymorphic
https://reasonablypolymorphic.com/blog/typeholes/