Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
defmodule Parser do | |
def numero() do | |
fn | |
<<c::utf8>> <> rest -> | |
case c do | |
c when c in ?0..?9 -> {:ok, c - ?0, rest} | |
_ -> {:error, {:numero, :no_parse, c}, <<c::utf8>> <> rest} | |
end | |
end | |
end |
Source: https://github.com/zed-industries/community/issues/1526#issuecomment-1543891012 | |
{ | |
// ... | |
"language_overrides": { | |
"Elixir": { | |
"format_on_save": { | |
"external": { | |
"command": "mix", | |
"arguments": ["format", "--stdin-filename", "{buffer_path}", "-"] | |
} |