Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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