The Advent of Code in Elixir continues to be a humbling experience year after year. One of my weaknesses in programming puzzles and, in general, is a lack of intuition on which common collection operations to use. Or, to be more precise, since I don't know them intimately, I don't know when to apply them in code. It is way too often I get feedback on a code review on why do you do this thing with a plain map or reduce while you could use this and that helper function . Often, one can replace a custom function with a more expressive composition of well-known "stock" functions. I think a recap is in order. I enumerate in this post the most useful ones for me - or at least those I get the most feedback from. These are indeed useful even in the basic CRUD app! I took the names from Scala and Elixir standard libraries and checked that functions with similar names exist in Lodash and Ramda JS external libraries Chunk/Group/Split/Partition Make a list of lists based on a f...
Notes about what I do