maximo:: Int -> [Int] -> Int
maximo [] = error"No hay maximo"
maximo [x] = x
maximo (x:xs)
| x < maximo xs = maximo xs
| x >= maximo xs = x
maximo [] = error"No hay maximo"
maximo [x] = x
maximo (x:xs)
| x < maximo xs = maximo xs
| x >= maximo xs = x
No hay comentarios:
Publicar un comentario