More concise composition.
[cellular-automata.git] / polymorphism / 001 / src / polymorphism.ml
index bbfc59a..c2f0c3e 100644 (file)
@@ -143,7 +143,7 @@ struct
 
   let neighborhood t point =
     List.map Direction.all ~f:Direction.to_offset
-    |> List.map ~f:(fun offset_point -> Point.(point + offset_point))
+    |> List.map ~f:(Point.(+) point)
     |> List.filter ~f:(is_within_bounds t)
 
   let get_neighbors t point =
This page took 0.021612 seconds and 4 git commands to generate.