Posts by IvoLims • 41 points
3 posts
-
1
votes2
answers72
viewsA: Tree Junction - joinTree
I remember asking that question in one of my charts here’s the code: joinTrees :: BTree a -> LTree b -> Maybe (FTree a b) joinTrees (Empty) (Tip x) = Just (Leaf x) joinTrees (Node r ae1 ad1)…
-
1
votes2
answers366
viewsA: Elements of a List are all the same
There is no recursion in his code, IE, he has to repeat this same operation for all elements of the list. An example of simple code would be this: iguais :: [Float] -> Bool iguais [] = False…
-
2
votes3
answers244
viewsA: Exception: Non-exhaustive Patterns in Function - Haskell
This function reminds me the nub that is already set in Haskell to do just this would not solve the problem? import Data.List filtraLista [] = [] filtraLista [x] = [x] filtraLista (x:xs) = x :…