       #=> [4]
 
   """
+  @spec filter_map(t, fun(element, do: boolean), fun(element, do: element)), do: t
   def filter_map(collection, filter, mapper) when is_list(collection) do
     lc item inlist collection, filter.(item), do: mapper.(item)
   end

      #=> [a: -1, b: -2]

  """
  def map(collection, fun) when is_list(collection) do
    lc item inlist collection, do: fun.(item)
  end

      #=> 6

  """
  @spec reduce(t, any, fun(element, any, do: any)), do: any
  def reduce(collection, acc, fun) when is_list(collection) do
    :lists.foldl(fun, acc, collection)
  end
