 
   # Get the neighboring positions of `position`, filter out the dead neighbors,
   # then get the cell positions which should be created and return them.
+  @spec to_create(position) :: [position]
   defp to_create(position) do
     position
     |> get_neighboring_positions

  # Make sure the cell with PID `pid` is alive, and if so, return it.
  # Filter out `alive` processes since `terminate_child` will remove the cell from the Supervisor,
  # but it may not be fully removed from the Registry yet.
  defp lookup(position) do
    Cell.Registry
    |> Registry.lookup(position)

  end

  # Returns a filtered list of all living positions within `positions`.
  @spec get_living_neighbors([position]) :: [position]
  defp get_living_neighbors(positions) do
    filter(positions, &(lookup(&1) != nil))
  end
