(bind-func cell_count_neighbors
  (lambda (w x y)
    (+ (cell_value w (- x 1) (- y 1))
       (cell_value w (- x 1) y)
       (cell_value w (- x 1) (+ y 1))
       (cell_value w x (- y 1))
       (cell_value w x (+ y 1))
       (cell_value w (+ x 1) (- y 1))
       (cell_value w (+ x 1) y)
       (cell_value w (+ x 1) (+ y 1)))))