Sha256: 6c341b3987396ee9aec4611b332b5ea0d1aac046c0549e91747ceb6cf3012cb5
Contents?: true
Size: 528 Bytes
Versions: 69
Compression:
Stored size: 528 Bytes
Contents
defmodule Strain do @doc """ Given a `list` of items and a function `fun`, return the list of items where `fun` returns true. Do not use `Enum.filter`. """ @spec keep(list :: list(any), fun :: (any -> boolean)) :: list(any) def keep(list, fun) do end @doc """ Given a `list` of items and a function `fun`, return the list of items where `fun` returns false. Do not use `Enum.reject`. """ @spec discard(list :: list(any), fun :: (any -> boolean)) :: list(any) def discard(list, fun) do end end
Version data entries
69 entries across 69 versions & 1 rubygems