Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iguales :: [a] -> [a] -> [a]
- iguales a b = compareHeads a b
- iguales (a:as) (b:bs) = compareHeads a b ++ iguales as bs
- compareHeads :: (Num a) => a -> a -> a
- compareHeads x y = if (x == y) then x else 0
- Ejercicios Relacion 2.hs:89:38:
- Couldn't match type `a' with `[a]'
- `a' is a rigid type variable bound by
- the type signature for iguales :: [a] -> [a] -> [a]
- at Ejercicios Relacion 2.hs:88:1
- In the first argument of `compareHeads', namely `a'
- In the first argument of `(++)', namely `compareHeads a b'
- In the expression: compareHeads a b ++ iguales as bs
- Ejercicios Relacion 2.hs:89:40:
- Couldn't match type `a' with `[a]'
- `a' is a rigid type variable bound by
- the type signature for iguales :: [a] -> [a] -> [a]
- at Ejercicios Relacion 2.hs:88:1
- In the second argument of `compareHeads', namely `b'
- In the first argument of `(++)', namely `compareHeads a b'
- In the expression: compareHeads a b ++ iguales as bs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement