More concise composition.
authorSiraaj Khandkar <siraaj@khandkar.net>
Sat, 5 Oct 2013 02:43:24 +0000 (22:43 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sat, 5 Oct 2013 02:43:24 +0000 (22:43 -0400)
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.019543 seconds and 4 git commands to generate.