Skip to content

Commit

Permalink
Ficha 1 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingFisan committed Aug 25, 2020
1 parent f3d3cad commit 834a1dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Fichas/Ficha01.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ poligono (Triangulo p1 p2 p3) = (posy p2 - posy p1) / (posx p2 - posx p1) /= (po

vertices :: Figura -> [Ponto]
vertices (Circulo _ _) = []
vertices retang@(Retangulo p1 p2) = if poligono retang then [(p1), (Cartesiano (posx p1) (posy p2)), (Cartesiano (posx p2) (posy p1)), (p2)] else []
vertices retang@(Retangulo p1 p2) = if poligono retang then [p1, (Cartesiano (posx p1) (posy p2)), (Cartesiano (posx p2) (posy p1)), (p2)] else []
vertices triang@(Triangulo p1 p2 p3) = if poligono triang then [p1, p2, p3] else []

area :: Figura -> Double
Expand All @@ -151,10 +151,10 @@ perimetro (Triangulo p1 p2 p3) = dist p1 p2 + dist p2 p3 + dist p1 p3
-- Exercicio 8

isLower' :: Char -> Bool
isLower' ch = elem (ord ch) [97..122]
isLower' ch = elem ch ['a'..'z']

isUpper' :: Char -> Bool
isUpper' ch = elem (ord ch) [65..90]
isUpper' ch = elem ch ['A'..'Z']

isDigit' :: Char -> Bool
isDigit' d = elem d ['0'..'9']
Expand Down

0 comments on commit 834a1dd

Please sign in to comment.