Advertisement
Coriic

Untitled

Jun 4th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hasNeighbors (Coordinates x y) listOfCoordinates = Prelude.or (Prelude.map (\(xTranslation, yTranslation) -> ((Coordinates (x+xTranslation) (y+yTranslation)) `elem` listOfCoordinates)) [(x,y) | x<-[-1..1], y<-[-1..1], x/=0 && y/=0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement