This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

Last Three Year's Trending Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
darwin67
Hi folks, I’m building a library and I have an interesting case when it comes to pattern matching with maps. Would appreciate any help ...
New
tadeifelipe
Hey everyone! How can I keep the original ordering of a Map? I’ve created one and notice that after the creation, the order of elements...
New
James_E
I’ve got this bit of code; I’m wondering why create_or_open_room always creates a new room, even when there is an existing child process ...
New
jkbbwr
So I have found a pothole and I am not sure what the solution is. I have a pretty standard JSON api in phoenix, I am using ecto, and I a...
New
lud
When you know that the map has only one key (from a guard for instance), is there something more efficient than this: [{k, v}] = Map.to_...
New

Trending Over Three Years Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
sudostack
Having written a lot more Phoenix templates as of late, I’m doing a lot more attribute checks than I would like. In Ruby 2.3 we could use...
New
Sanjibukai
Hello everybody, As it’s possible to partially pattern match with maps like so: iex> %{b: 2} = %{a: 1, b: 2, c: 3} %{a: 1, b: 2, c: ...
New
bryanhuntesl
I’ve done a lot of GitHub searching but I can’t find an erlang/elixir data structure similar to Java’s SortedMap. I’ve been using ETS :s...
New
DimWell
Hi, I am relatively new to Elixir and need a support from more advanced users. I try to do a simple thing → Flatten Map But Elixir and...
New
amnu3387
Hi, so when I Map.put even if I use the string quotation marks on the key Elixir will render the map with atoms. This is further proble...
New
marioalvial
Im trying to get one element and the rest of the map with pattern matching but I’m only get compile errors. I came up with this: %{“One...
New
nezzart
I have a key as a variable, I want to create a Map with a key :key1 or "key2" using one of the variables, but I'm unable to: iex(24)&g...
New
otuv
Hi, I have a list of maps such as: [%{x: a, y: 1}, %{x: a, y: 1}, %{x: b, y: 0}, %{x: b, y: 1}] From this I would like to find out how...
New
ijverig
We can match arguments like this in elixir: iex(1)> f = fn(a, [b: a]) -> a end ...
New
9mm
Hello, I have a collection like: %{stats_a: [4, 5, 6], stats_b: [1, 2, 3]} # not actually integers (see next question) Each of the 2 l...
New
fireproofsocks
I’m sure this has been asked elsewhere (but forgive me I could not find something that addressed this specifically)… Why do Elixir funct...
New
chrism2671
Let’s a consider a theoretical case of building an in-memory stock exchange on Elixir. A stock exchange has a limit order book, which is...
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