Latest #enum Threads 
Hi everyone!
My colleagues and I ran into challenges with atoms and tuples in our Elixir codebases, especially when modeling domain stat...
New
So I was solving an advent of code challenge and stumbled upon a behavior that was unexpected to me so I’m making a query here to find ou...
New
I propose adding compact_map/2 to the Enum module.
What is it?
Sometimes you want to map over a collection, but sometimes you want to ma...
New
I know this is a really minor peeve, but why is this the case?:
iex(cs@localhost)54> %{key1: :i_am_a_map_whooot} |> Enum.map(&...
New
In my code here, work_loop uses Enum.reduce_while/3, but as you can see it’s just discarding the accumulator.
I’m wondering if that’s a ...
New
Enum.map converts results with 2-item-tuples where the first item is an atom to a keyword-list. This has it’s use cases, but when you wan...
New
I want to preface this by saying that I’m feeling very thankful for all the helpful answers I’ve been getting from the community and feel...
New
Quick question!
If you have code like this
if Enum.count(x) > 1 do .... end
Can elixir optimise the line, and exit the count as soo...
New
I have added a task.yield in the callback function of Enum.map, Does Enum.map run serially or in parallel? If it runs serially then this ...
New
Is there a more idiomatic way to fill the tail of a list with default values?
That is, given a list, return a list that is at least n el...
New
This Week's Trending
This Month's Trending
This Year's Trending
Last Three Year's Trending
I just upgrade OTP to 20.0 and elixir to 1.5.0-rc.1, I got warnings on usage of filter_map. Why is it deprecated?
New
While not as prevalent as in imperative languages, arrays (collections with efficient random element access) are still very useful in Eli...
New
How can I efficiently append one entry to a list? Is this the best solution:
history = [{1,100}, {2,300}, {3,200}]
current = {4,150}
ch...
New
I have added a task.yield in the callback function of Enum.map, Does Enum.map run serially or in parallel? If it runs serially then this ...
New
Heya.
I am inviting you to copy-paste the module below and add your own functions and measure them, or simply give other ideas about how...
New
I know this is a really minor peeve, but why is this the case?:
iex(cs@localhost)54> %{key1: :i_am_a_map_whooot} |> Enum.map(&...
New
There is sometimes cases where you want to map every nth item starting on the nth item. Eg map every 2nd item starting on the 2nd one. Cu...
New
Hi everyone!
My colleagues and I ran into challenges with atoms and tuples in our Elixir codebases, especially when modeling domain stat...
New
I want to preface this by saying that I’m feeling very thankful for all the helpful answers I’ve been getting from the community and feel...
New
I propose adding compact_map/2 to the Enum module.
What is it?
Sometimes you want to map over a collection, but sometimes you want to ma...
New
Quick question!
If you have code like this
if Enum.count(x) > 1 do .... end
Can elixir optimise the line, and exit the count as soo...
New
Enum.map converts results with 2-item-tuples where the first item is an atom to a keyword-list. This has it’s use cases, but when you wan...
New
In my code here, work_loop uses Enum.reduce_while/3, but as you can see it’s just discarding the accumulator.
I’m wondering if that’s a ...
New
So I was solving an advent of code challenge and stumbled upon a behavior that was unexpected to me so I’m making a query here to find ou...
New
Trending Over Three Years
I have a list say
x = ["23gh", "56kh", "97mh"]
I would like to pass each element to Val in each iteration.
Say, in iteration 1 -------...
New
(where x is an integer >= 0)
Is there a one-liner for this?
I found that Enum.times was deprecated back in in 2012:
But it seems t...
New
I found José’s useful response to how to sort a list of maps by a column. I’m not following how to expand this into sorting by multiple ...
New
In imperative languages, if one wants to compare every element in an array with the other they can use nested loops where the inner loop ...
New
Hello,
I have an Ecto query which gets me some data from the database, then I use Enum.filter to get filtered results and now I want to ...
New
Hey I have a list of structs like these:
%App.Accounts.Event{
__meta__: #Ecto.Schema.Metadata<:loaded, "events">,
datetime...
New
I have a list of maps that provide a type of property lookup, and a map with values.
lookup =
[
%{key: "foo", type: :string},
...
New
Here nums is a list of [list of {tuples}].
nums = [[{5,2}], [{10,2},{4,5}], [{6,5},{3,10},{2,15}]]
I want to print output like this:
1...
New
defmodule Sandbox do
def currencies do
[
%{
"USD" => %{
asset: "USD",
exchange_currencies: ["J...
New
In General if the Enum.all? evaluates true that means all the elements in the given collection evaluates true for the given callback func...
New
Hello all,
I have a list of structs, and I want to iterate through each element and from each element create a new map with multiple key...
New
Hi Everybody,
Recently I discovered interesting use case for reduce_while that does not use acc as accumulator -> it doesn’t carry / ...
New
How to find index of element inside enum by property?
I have this enum and I need to find the index of an item by its id(or another prop...
New
I know how to use Enum.group_by with one column, but I’m not sure how to use it with multi columns.
Following example is group_by(id).
...
New
Hi all!
As you may know, it is very common in idiomatic Elixir code to work with transformations on datastructures, especially those imp...
New
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #exunit
- #elixirconf
- #discussion
- #javascript
- #podcasts
- #code-sync
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #api
- #processes
- #forms
- #metaprogramming
- #security
- #performance
- #hex







