Latest #enumerables Threads Top

kevinschweikert
I have written about something i implemented at work. It’s a nice show off for Elixir streams and protocols and the nice abstraction they...
New
Asd
Stream.peek and Stream.pop I find Stream API limited and I often have to introduce workarounds for things like taking values from enumera...
New
bvobart
For a list of integers, I can simply write a typespec like this: @type foo() :: [integer()] # or list(integer()) But what about a Strea...
New
heilong
Is there a guard for testing protocol implementation? is_proto/2 For example, how to guard test for implementing Enumerable? I underst...
New
James_E
How would you leverage or translate an existing, clear Enum.reduce/3-alike struct method into a valid defimpl for Enumerable.reduce/3? W...
New
formingform
Hello! I’m trying to filter list of maps to remove items where value of key was declared previously in this list. List that I have: lis...
New
James_E
The Comprehensions article says: In Elixir, it is common to loop over an Enumerable … Comprehensions are syntactic sugar for such const...
New
Fl4m3Ph03n1x
Background I have a structure where the new function requires a parameter to be part of a closed set of values (think of it as an enum). ...
New
bendevski
I’m playing around with elixir and solving some leetcode problems but I ran into an issue. The following code: defmodule Solution do @...
New
pertsevds
When i use List.flatten() it would flatten a deep list with every nested . iex> list = [[],["ant",["hello","hi",[[[]]]], "bat"], ["ca...
New

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

bvobart
For a list of integers, I can simply write a typespec like this: @type foo() :: [integer()] # or list(integer()) But what about a Strea...
New
kevinschweikert
I have written about something i implemented at work. It’s a nice show off for Elixir streams and protocols and the nice abstraction they...
New
Asd
Stream.peek and Stream.pop I find Stream API limited and I often have to introduce workarounds for things like taking values from enumera...
New

Last Three Year's Trending Top

michaelb
Hello! I’m trying to filter list of maps to remove items where value of key was declared previously in this list. List that I have: lis...
New
Qqwy
While not as prevalent as in imperative languages, arrays (collections with efficient random element access) are still very useful in Eli...
New
James_E
How would you leverage or translate an existing, clear Enum.reduce/3-alike struct method into a valid defimpl for Enumerable.reduce/3? W...
New
James_E
The Comprehensions article says: In Elixir, it is common to loop over an Enumerable … Comprehensions are syntactic sugar for such const...
New
formingform
Hello! I’m trying to filter list of maps to remove items where value of key was declared previously in this list. List that I have: lis...
New
Fl4m3Ph03n1x
Background I have a structure where the new function requires a parameter to be part of a closed set of values (think of it as an enum). ...
New
heilong
Is there a guard for testing protocol implementation? is_proto/2 For example, how to guard test for implementing Enumerable? I underst...
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
Qqwy
A proper list is a list that ends in an empty list, such as: [1, 2, 3] (which is syntactic sugar for [1 | [ 2 | [3 | [] ] ] ] ) An im...
New
anurag.peshne
what is the closest thing to Arrays in Elixir. By arrays I mean, a container for values which I can access in constant time. I’ve looked...
New
vrod
Sorry because many other people asked a similar question… but how do you implement the Enumerable protocol for a struct? I see the docs ...
New
chulkilee
I wrapped an API using pagination with Stream.unfold so that it returns Enum.t (Enumerable.t). Is it possible to specify @spec of value...
New
JupiterIO1
Ultimately I’d like to update the values of keys in myMap based on whether the key is in myList and in myOtherList: myList = ["a", "b", ...
New
neuone
How would I map over something like this? results = [ {"John Smith", %{"twitter" => "jsmith"}}, {"Lisa Smith", %{"twitter" =>...
New
vfsoraki
Example: iex(1)> Enum.reduce([], fn x,y -> y end) ** (Enum.EmptyError) empty error (elixir) lib/enum.ex:1754: Enum.reduce/2 ...
New
Maxximiliann
trades = %{ "3QvxP6YFBKpWJSMAfYtL8Niv8KmmKsnpb9uQwQpg8QN2" => [ %{ asset: "3QvxP6YFBKpWJSMAfYtL8Niv8KmmKsnpb9uQwQpg8QN2",...
New
type1fool
Hello, Elixir gang. I’m starting to get the hang of Elixir, which has been challenging since I’m not coming from Ruby. I have been strugg...
New
benonymus
Hey I a trying to make a login system for my phoenix app, but I am having an error on successful login attempt: # protocol Enumerable no...
New
Qqwy
Hi all! As you may know, it is very common in idiomatic Elixir code to work with transformations on datastructures, especially those imp...
New
pertsevds
When i use List.flatten() it would flatten a deep list with every nested . iex> list = [[],["ant",["hello","hi",[[[]]]], "bat"], ["ca...
New
kasparinho
Bin Counting elements in a collection by updating a counter map is much slower than first grouping the elements by bin and then count eac...
New
grangerelixx
I have a list of maps. For example, students = [%{ sid: 1, name: "Bob", score: 80}, %{ sid: 2, name: "Kelly", score: 60},.....] I have...
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