I use ets to store and retrieve keys through elixir as a simple memory persistence layer, and also for occasional foldl, which involves reducing many duplicate keys with different values. I am usin
Tag: Elixir
Agreement – “for” actually checking “for” in “defimpl” in Elixir?
Does “for” always check the type of the first parameter in each function defined in the protocol?
Edit (paraphrase):
When the protocol method has only one parameter, find the implementation
List – Can you choose to insert the pipe output to insert the Elixir function args?
Consider the (smelly, non-idiomatic) function as follows:
def update_2d(array, inds, val ) do
[first_coord, second_coord] = inds
new_arr = List.update_at(array, second_coord, fn(y) ->
List