Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

This list shows some idioms having at least : 1 Elixir implementation with some empty fields.

You may click on a missing field and fill the gap.

Demo
URL
Doc
URL
# 56 Launch 1000 parallel tasks and wait... Ø # 1 f = &(IO.puts(&1)) # 2 printTimes ...
# 97 Check string suffix Ø String.ends_with?(s, suffix)
# 182 Quine program Ø Ø q=<<"q=~p;:io.format q,[q]">>;:io.format...
# 161 Multiply all the elements of a list Ø elements = Enum.map(elements, &(&1 * c))
# 21 Swap values Ø Ø {a, b} = {b, a}
# 66 Big integer exponentiation Ø Ø z = :math.pow(x, n)
# 157 Declare constant string Ø Ø planet = "Earth"
# 80 Truncate floating point number to i... Ø y = trunc(x)
# 64 Big integer : value 3 power 247 Ø Ø x = :math.pow(3, 247)
# 7 Iterate over list indexes and value... Ø items |> Enum.with_index |> Enum.each(fn...
# 50 Make an infinite loop Ø Ø defmodule Looping do def infinite do ...
# 131 Successive conditions Ø Ø cond do c1 -> f1 c2 -> f2 c3 -> f3...
# 79 Convert integer to floating point n... Ø Ø y = x / 1
# 63 Replace fragment of a string Ø x2 = String.replace(x, y, z)
# 26 Create a 2-dimensional array Ø x = for _ <- 1..m, do: for _ <- 1..n, do...
# 93 Pass a runnable procedure as parame... Ø Ø def control(f) do f() end
# 12 Check if list contains a value Ø Enum.member?(list, x)
# 12 Check if list contains a value Ø Ø x in list
# 30 Parallelize execution of 1000 indep... Ø f = fn x -> x * :rand.uniform() end tas...
# 15 Pick uniformly a random integer in ... Ø :crypto.rand_uniform(a, b)
# 15 Pick uniformly a random integer in ... Ø a - 1 + :rand.uniform(b-a+1)
# 49 Split a space-separated string Ø chunks = String.split(s)
# 54 Compute sum of integers Ø s = Enum.sum(x)
# 99 Format date YYYY-MM-DD Ø x = Date.to_iso8601(d)
# 14 Pick uniformly a random floating po... Ø a + :rand.uniform() * (b-a)
# 14 Pick uniformly a random floating po... Ø defmodule MyRandomPicker do def pick(a...
# 118 List to set Ø y = x |> Enum.uniq |> List.to_tuple
# 118 List to set Ø y = MapSet.new(x)
# 29 Remove item from list, by its index Ø List.delete_at(items, i)