summaryrefslogtreecommitdiff
path: root/src/ch2/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch2/Main.hs')
-rw-r--r--src/ch2/Main.hs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ch2/Main.hs b/src/ch2/Main.hs
new file mode 100644
index 0000000..74d0054
--- /dev/null
+++ b/src/ch2/Main.hs
@@ -0,0 +1,28 @@
+import Shape
+
+main :: IO ()
+main = do
+ 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)
+ ]
+ )