Top "Elixir" questions

Elixir is an open-source, dynamic, compiled, general purpose functional programming language.

How to print out a map's array values in Elixir?

New to Elixir from Ruby and I'm trying to print out a map's array values using the following code: map-script.…

elixir
Simulate ternary operator in Elixir

How to do the similar conditional one-line check in Elixir? if (x > 0) ? x : nil Is this the only equivalent …

elixir ternary-operator
Elixir: When to use .ex and when .exs files

Elixir's documentation states that In addition to the Elixir file extension .ex, Elixir also supports .exs files for scripting. Elixir …

elixir
What's the difference between `def` and `defp` in the Phoenix Framework?

I'm going through the Programming Phoenix book and I am wondering what the difference between def and defp is. There …

elixir phoenix-framework
Elixir: How to convert a keyword list to a map?

I have a keyword list of Ecto changeset errors I'd like to convert to a map so that the Poison …

json elixir
Creating a unique constraint on two columns together in Ecto

How do you create a unique index on two columns in Ecto, which would correspond to this: CREATE TABLE someTable ( …

elixir ecto
How do I raise a number to a power in Elixir?

How can I calculate a number with an exponent in Elixir? For example, 23 would return 8.

elixir
Debugging and debugging tools in Elixir?

I've just started using Elixir, and have started a Phoenix project, which I enjoy a lot. Now by having rails …

elixir
How to rollback, reset, or drop Ecto test database?

Usually mix.test cleans the test database, but it is not working. It may be because I was playing around …

testing elixir phoenix-framework ecto
Making a field unique in ecto

How to make a field unique in ecto? I thought it's the same as the active record in Ruby, but …

elixir ecto