Skip to content

Instantly share code, notes, and snippets.

@emanoelbarreiros
Created February 23, 2021 21:17
Show Gist options
  • Save emanoelbarreiros/5ce4e8258529961a2d9cf99cf8543f2f to your computer and use it in GitHub Desktop.
Save emanoelbarreiros/5ce4e8258529961a2d9cf99cf8543f2f to your computer and use it in GitHub Desktop.
Definição da função foldr
foldr :: (a -> b -> b) -> b -> [a] -> b
foldr f v [] = v
foldr f v (x:xs) = f x (foldr f v xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment