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 |
|||
|---|---|---|---|---|
| # 38 | Extract a substring | Ø | ✓ | t = String.slice(s, i..j-1) |
| # 12 | Check if list contains a value | Ø | ✓ | Enum.member?(list, x) |
| # 12 | Check if list contains a value | Ø | Ø | x in list |
| # 64 | Big integer : value 3 power 247 | Ø | Ø | x = :math.pow(3, 247) |
| # 75 | Compute LCM | Ø | Ø | defmodule BasicMath do def gcd(a, 0), d... |
| # 32 | Integer exponentiation by squaring | Ø | ✓ | :math.pow(x, n) |
| # 161 | Multiply all the elements of a list | ✓ | Ø | elements = Enum.map(elements, &(&1 * c)) |
| # 97 | Check string suffix | Ø | ✓ | b = String.ends_with?(s, suffix) |
| # 50 | Make an infinite loop | Ø | Ø | defmodule Looping do def infinite do ... |
| # 54 | Compute sum of integers | Ø | ✓ | s = Enum.sum(x) |
| # 203 | Calculate mean and standard deviati... | Ø | ✓ | defmodule SD do import Enum, only: [ma... |
| # 41 | Reverse a string | Ø | ✓ | t = String.reverse(s) |
| # 135 | Remove item from list, by its value | Ø | ✓ | List.delete(items, x) |
| # 99 | Format date YYYY-MM-DD | Ø | ✓ | x = Date.to_iso8601(d) |
| # 116 | Remove occurrences of word from str... | Ø | ✓ | s2 = String.replace(s1, w, "") |
| # 153 | Concatenate string with integer | Ø | ✓ | t = s <> to_string(i) |
| # 146 | Convert string to floating point nu... | Ø | ✓ | f = String.to_float(s) |
| # 302 | String interpolation | ✓ | Ø | s = "Our sun has #{x} planets" |
| # 48 | Multi-line string literal | Ø | Ø | s = "Spanning string works" |
| # 48 | Multi-line string literal | Ø | ✓ | s = """ multiline heredoc """ |
| # 48 | Multi-line string literal | Ø | ✓ | s = ~S""" This will print multiline and ... |
| # 83 | Regex with character repetition | Ø | ✓ | r = Regex.compile!("htt+p") |
| # 184 | Tomorrow | Ø | Ø | def main() do Date.utc_today() |> Da... |
| # 66 | Big integer exponentiation | Ø | Ø | z = :math.pow(x, n) |
| # 100 | Sort by a comparator | Ø | ✓ | Enum.sort(items, c) |
| # 266 | Repeated string | Ø | ✓ | s = String.duplicate(v, n) |
| # 224 | Add element to the beginning of the... | Ø | Ø | items2 = [x | items] |
| # 56 | Launch 1000 parallel tasks and wait... | Ø | ✓ | # 1 f = &(IO.puts(&1)) # 2 printTimes ... |