This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

Last Three Year's Trending Top

cjen07
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
odohMei7
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
a-c-sreedhar-reddy
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
dimitarvp
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
nhpip
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
BradS2S
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
H8rs
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
kai_feldhoff
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
James_E
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
ken-kost
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 Top

mathew4509
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
riga
(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
fireproofsocks
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
Harrygr
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
MatijaL
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
benonymus
Hey I have a list of structs like these: %App.Accounts.Event{ __meta__: #Ecto.Schema.Metadata<:loaded, "events">, datetime...
New
billposters
I have a list of maps that provide a type of property lookup, and a map with values. lookup = [ %{key: "foo", type: :string}, ...
New
sagnik2911
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
Maxximiliann
defmodule Sandbox do def currencies do [ %{ "USD" => %{ asset: "USD", exchange_currencies: ["J...
New
blackode
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
Samuel-88
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
benhoven
Hi Everybody, Recently I discovered interesting use case for reduce_while that does not use acc as accumulator -> it doesn’t carry / ...
New
CAIOHOBORGHI
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
tajihiro
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
Sebb
There seems to be no way to split an Enum like String.split does. Actually those functions have very different semantics. String.split("...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement