Haskell - Grouping specific nearest neighbours in a cartesian grid

Published: 24/08/2019
Haskell - Grouping specific nearest neighbours in a cartesian grid
Source: STACKOVERFLOW.COM

I'm after some direction in this puzzle where I need to group specific nearest neighbours together. my input data is: myList :: Map (Int, Int) Int myList = fromList [((-2,-2),0),((-2,-1),0),((-2,0),2),((-2,1),0),((-2,2),0) ,((-1,-2),1),((-1,-1),3),((-1,0),0),((-1,1),0),((-1,2),1) ,((0,-2),0),((0,-1),0),((0,0),0),((0,1),0),((0,2),0) ,((1,-2),0),((1,-1),0),((1,0),0),((1,1),2),((1,2),1) ,((2,-2),0),

Read more
Related news
Comment
FACEBOOK