summaryrefslogtreecommitdiff
path: root/ex2/Main.hs
diff options
context:
space:
mode:
authorCarlos Sosa <gnusosa@gnusosa.net>2019-09-25 09:27:43 -0700
committerCarlos Sosa <gnusosa@gnusosa.net>2019-09-25 09:27:43 -0700
commit525cf5908bebd1a97f803810b8ae318bffbd6fe4 (patch)
tree73a6eacd113674cdb5da4e6ac8e298673f366324 /ex2/Main.hs
parente3c1b9511ad3d77e09bddfbadf10dae8725be65a (diff)
Almost done with ex 2.4
Diffstat (limited to 'ex2/Main.hs')
-rw-r--r--ex2/Main.hs28
1 files changed, 26 insertions, 2 deletions
diff --git a/ex2/Main.hs b/ex2/Main.hs
index 7e32c4a..74d0054 100644
--- a/ex2/Main.hs
+++ b/ex2/Main.hs
@@ -1,4 +1,28 @@
-import Shape
+import Shape
+main :: IO ()
main = do
- putStrLn $ show $ square 5.0
+ putStrLn "Convex Polygon:"
+ putStrLn
+ $ show
+ $ area
+ (polygon
+ [ (550, 450)
+ , (455, 519)
+ , (491, 631)
+ , (609, 631)
+ , (645, 519)
+ ]
+ )
+ putStrLn "Concave Polygon:"
+ putStrLn
+ $ show
+ $ area
+ (polygon
+ [ (550, 580)
+ , (455, 519)
+ , (491, 631)
+ , (609, 631)
+ , (645, 519)
+ ]
+ )