Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Funcion para saber si un numero esta en una lista
- contiene e [] = False
- contiene e (x:xs) = if e == x then True
- else contiene e xs
- -- Funcion aplicar funcion a lista
- mapear f [] = []
- mapear f (x:xs) = f x : mapear f xs
- -- Funcion filtrar (filter)
- filtrar f [] = []
- filtrar f (x:xs) = if f x then (x : filtrar f xs) else filtrar f xs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement