Most voted "elixir" questions
Elixir is a functional programming language, which runs on the VM and compiles on top of Erlang. It is a dynamic and functional language designed for building scalable and sustainable applications.
Learn more…20 questions
Sort by count of
-
7
votes2
answers165
viewsWhat is the purpose of ? (question mark) in calling a function?
I’m studying the module Enum of the Elixir language in which it provides various functions that allows working with enumerables, However, one thing caught my attention in the call of some of the…
-
6
votes1
answer94
viewsWhat is the purpose of the module in Elixir?
I’m studying Elixir and I came across the keyword defmodulo, I used to define a basic module that displays a message: defmodule Mensagem do def escreve(msg) do IO.puts msg end end Calling in the…
-
5
votes1
answer348
viewsWhat is Pattern Matching?
I’m reading about the Pattern matching and I’m still very confused about this feature because it’s something new for me. Here are some examples: {:ok, result} = {:ok, 12} {:okay, 12} and 12 = result…
-
4
votes1
answer155
viewsWhat is "|>" for in Elixir?
Reading some codes from elixir I see |> be used commonly. What it means?
elixirasked 6 years, 10 months ago Yago Azedias 1,117 -
3
votes1
answer205
viewsHow to create groups in regex to validate password criteria in Elixir?
I need to validate the criteria in a password: It must contain at least one capital letter. At least one tiny At least one number The size should be between 6 and 32 characters May not have any…
-
3
votes2
answers178
viewsDuck type in Elixir
[5,a,15] = [5,10,15] Doing this type of assignment in Elixir is Duck Typing or are different concepts? I ask because I was left with doubt since on the left side is declared a "variable" without an…
-
2
votes1
answer116
viewsWhat is the difference between "===" and "==" in Elixir?
I would like to know the difference between == and === when making expressions and conditions with elixir
elixirasked 6 years, 10 months ago Yago Azedias 1,117 -
2
votes1
answer56
viewsWhat do the characters mean in the parameter of a function in Elixir?
For example: defmodule Math do def add(a \\ 2, b) do a + b end end What those two bars mean?
-
2
votes1
answer67
viewsHow to get all letters of the alphabet in Elixir?
I would like to get all the letters of the alphabet in a string list without having to write letter by letter. a = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",…
elixirasked 6 years, 9 months ago Yago Azedias 1,117 -
1
votes1
answer218
viewsHow to pick an element from a list by index in Elixir
I tried to take it the traditional way: [:a, :b, :c, :d][2] but I get the following error: ** (ArgumentError) the Access calls for keywords expect the key to be an atom, got: 2 (elixir)…
elixirasked 6 years, 10 months ago Yago Azedias 1,117 -
1
votes1
answer219
viewsHow to make a recursive function to sum all the values of an Elixir list
I would like a function that, taking as a parameter a list, returns me the list somatic. Something like: iex(0)> Recursive.sumAll([1, 3, 5]) # => 9
elixirasked 6 years, 10 months ago Yago Azedias 1,117 -
1
votes1
answer112
viewsElixir multiplication on a Map does not work. Why?
I’m new to Elixir and I don’t understand the return of function. list = %{"100" => 1, "50" => 2, "20" => 4, "10" => 8, "5" => 16, "1" => 32} for {key, value} <- list, do:…
-
1
votes1
answer40
viewsBlank line Elixir template
This code displays a message if it exists, but when it does not exist, displays a white line: <%= if @comprovante["transacao"]["complemento"] do %>OBSERVACAO: <%=…
-
1
votes0
answers47
viewsProblem with foreign key insertion in Postgres bank - Elixir/Phoenix
I am new in the use of Elixir and would like to make an insertion with foreign key in the bank (Postgres), via POST (is a JSON) below my modules defmodule MeuProjeto.Carteiras.Carteira do use…
elixirasked 6 years, 1 month ago BarbaAlGhul 21 -
1
votes1
answer67
viewsWhat is the difference between Reduce and Foldl in Elixir?
I found myself needing a job reduce (for having more custom with JS this is the first name that comes to mind) in the Elixir and found the Enum.reduce/2, but with a little more research already in…
-
1
votes0
answers301
viewsXML signing error for EFD-Reinf in Elixir
I followed the instructions posted on this link: This is quite enlightening, but I’m still having trouble signing REINF XML, using Elixir as a language. In the example I put below, I am trying to…
-
1
votes2
answers127
viewsHow to access the console of an Elixir application?
I have a back-end application in Elixir that has a bug in the server, so that new users can not make a new registration in the app, but old users can use normally. I need to enter a new user…
-
1
votes1
answer27
viewsStop process in case of failure or invalid data
I am developing an elixir API and I have a certain process that performs 6 chain actions. My question is how to interrupt this execution each of these 6 actions has a problem. I would not like to…
elixirasked 3 years, 12 months ago Paulo Féra 134 -
0
votes2
answers61
viewsManipulating lists in Elixir
I’m starting in the Elixir language and would like to know if there is a repository of 'modules' created and fed by the community and that are widely used in projects, generating productivity and…
elixirasked 4 years, 5 months ago Felipe Wielewski 3 -
-1
votes2
answers75
viewsHow to stop a for in Elixir?
I’m making a loop that will check my list. The problem is that the loop doesn’t stop when I get where I want, then it ends up showing everything that has been checked. defmodule Tester do def…