python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Elixir - possible to combine custom map types?
When defining types in an Elixir module, is it possible to merge two different map types, where one is a subset of the other? For example:
defmodule Test do
@typep map_a :: %{foo: String.t(), bar: S...
skwidbreth
Votes: 0
Answers: 1
Reversing list with recursion in Elixir
My task is to take a list and then reverse it recursively, using one parameter.
What I have arrived at is this solution:
def reverse(l) do
[head | tail] = l
cond do
tail == [] -...
Sightvision
Votes: 0
Answers: 3
Enum.reduce_while vs Enum.reduce in Elixir
I am a beginner at Elixir. Here are my queries. I have written two functions below.
a) The first one uses Enum.reduce_while
b) the second function uses Enum.reduce
I am observing the following:
a) In ...
Sudarsan
Votes: 0
Answers: 1