Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added comments
  • Loading branch information
jiegillet authored May 30, 2018
commit 1134af1972cd909a36bb6d237eff8d53bf03f610
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ grahamScan pts = wrap sortedPts [p0]
| otherwise = wrap ss (s:p1:p2:ps)

main = do
-- We build the set of points of integer coordinates within a circle of radius 5
let pts = [(x,y) | x<-[-5..5], y<-[-5..5], x^2+y^2<=5^2]
-- And extract the convex hull
print $ grahamScan pts