Sha256: f4de44a3c186b408509e635574f3097cae6e1690ce5664666b82e746a68aba8c

Contents?: true

Size: 532 Bytes

Versions: 160

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 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

160 entries across 160 versions & 1 rubygems

Version Path
trackler-2.2.1.49 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.48 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.47 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.46 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.45 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.44 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.43 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.42 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.41 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.40 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.39 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.38 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.37 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.36 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.35 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.34 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.33 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.32 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.31 tracks/elixir/exercises/strain/strain.exs
trackler-2.2.1.30 tracks/elixir/exercises/strain/strain.exs