Posts by Rui Reis • 93 points
3 posts
-
2
votes1
answer85
viewsA: How to change typing in Haskell
The problem in your code is due to the line containing the following information: in a <- randomly :: IO Float This in a shall never be greater than 1, since randomIO :: IO Float generate only…
-
3
votes2
answers72
viewsA: Tree Junction - joinTree
There are some fallacies in the code, such as assuming that two trees of the same height are computable in: alturaB (Node x l1 r1) == ltHeight (Fork l2 r2) Such a statement is not always true. Then…
-
1
votes1
answer52
viewsA: Transformation of Trees
To begin with, the following must be taken into account:: Btree - It is a tree in which the information is stored in the Nodes, but is not stored in the ends, since these are of the type Empty.…