Skip to content

Instantly share code, notes, and snippets.

@gpratoe
Created April 27, 2021 03:51
Show Gist options
  • Save gpratoe/f6102957fa7380425be48603b5b49348 to your computer and use it in GitHub Desktop.
Save gpratoe/f6102957fa7380425be48603b5b49348 to your computer and use it in GitHub Desktop.
Soluciones ejercicios Haskell mumuki UNC (10. Recursividad) - https://mumuki.io/introalgo-unc/lessons/194-programacion-funcional-recursividad
--Ejercicio 2: La historia sin fin
infinitosUnos = [1]++infinitosUnos
--Ejercicio 4: ¡Terminala! Parte 2
sumatoria :: Num a => [a] -> a
sumatoria [] = 0
sumatoria lista = head lista + sumatoria (tail lista)
--Ejercicio 5: El caso base
longitud [] = 0
longitud (x:xs) = (+1)(longitud xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment