This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List | |
data Point = Point Int Int deriving Show | |
data Direction = DLeft | |
| DRight | |
| DStraight | |
findPointP :: [Point] -> [Point] | |
findPointP points = sortBy smallestYthenX points | |
where smallestYthenX (Point x1 y1) (Point x2 y2) |