Sha256: 7501cc70d5fb227276d86064ee1065ef0b3718d874a4c0a88b84a7fe1e459673
Contents?: true
Size: 532 Bytes
Versions: 28
Compression:
Stored size: 532 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 true. 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
28 entries across 28 versions & 1 rubygems