Advertisement
ttaaa

Point

Jan 17th, 2022
670
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module Point
  2.     (
  3.         Point,
  4.         createPoint,
  5.         getX,
  6.         getY
  7.     ) where
  8.  
  9. data Point = Point Double Double deriving (Show)
  10.  
  11. createPoint :: Double -> Double -> Point
  12. createPoint x y = Point x y
  13.  
  14. getX :: Point -> Double
  15. getX (Point x y) = x
  16.  
  17. getY :: Point -> Double
  18. getY (Point x y) = y
  19.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement