Function parameters vs Keyword lists

You can see an Erlang example in how poolboy process builds its state:

https://github.com/devinus/poolboy/blob/master/src/poolboy.erl#L125-L146

I can’t think of elixir examples right now.


UPDATE: You can see an elixir example in this refactoring of credo (that didn’t actually make it, but shows the idea quite nicely):
https://github.com/rrrene/credo/pull/107/files#diff-6a5ceb395f2a140c73ab593bf06fcb55

https://github.com/michalmuskala/credo/blob/b0811c97f5a509593755f6c7b7c44d6f8d18b3ff/lib/credo/cli.ex#L122-L143

2 Likes