Feat: `remove_item_from_list`
nelsonic opened this issue Β· comments
Need this function and it doesn't appear to exists from my reading in the docs
for both https://hexdocs.pm/elixir/1.13.4/List.html and https://hexdocs.pm/elixir/1.13.4/Enum.html
We can implement it easily using a combination of functions.
But what I want is a one-line function that clearly says what it does and means I don't have to keep implementing this!
Todo
- Write tests
- Implement the function
- Ship the package!
Package published to https://hex.pm/packages/useful/1.13.0 π¦ π
PR: #57
Just remembered that all functions in the Elixir
Standard library
that deal with "enumerables" (Enum
, List
, Map
)
place the Enum
first in the argument list for a function
so that they can be piped!
Right now with my first iteration of remove_item_from_list/2
with the argument order item, list
(alphabetical),
we cannot pipe a list into the function ... π
Going to update the argument order quickly. BRB. π§βπ»
To be clear: I prefer the arguments to be alphabetic for OCD reasons ... π€
But if we're building a library that is Useful
to other people, π
.then
it makes sense to be consistent with the standard library ... π