in_a_block x l = not(free x l)

diff_blocks :: Int -> Int -> [Int] -> Bool
diff_blocks x y xs = abs(posx-posy) /= abs(x-y)
                     where posx = indexOf x xs -1
                           posy = indexOf y xs -1

first_of_block :: Int -> [Int] -> Bool
first_of_block x l | indexOf x l == 0 = False
                   | (prev == 0) = is_an_adjacency x next len
                   | otherwise = (not (is_an_adjacency prev x len) && is_an_adjacency x next len)
                   where prev = return_nth' ((indexOf x l) - 1) l