Skip to content

Instantly share code, notes, and snippets.

View apauley's full-sized avatar

Andreas Pauley apauley

View GitHub Profile
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)