#elixirtil search results

No results for "#elixirtil"

TIL: In Elixir, !! converts any value to its boolean equivalent. !!nil is false, !!value is true. Simple and useful feature i did not know about for longer than i should. #MyElixirStatus #ElixirTIL

wojciech_jestem's tweet image. TIL:
In Elixir, !! converts any value to its boolean equivalent. !!nil is false, !!value is true. Simple and useful feature i did not know about for longer than i should.
#MyElixirStatus #ElixirTIL

Is there was an Elixir forum topic for Elixir TIL and solutions like this? Instead of posting questions, we would post the solutions we found.



Don't know who needs to hear this, but in Elixir `[1 | 2]` is a valid data structure called "improper list". Not to be confused with `[1 | [2]]`. Another way to build one: `[1] ++ 2`. Improper lists are useful for optimizations. Details: dorgan.netlify.app/posts/2021/03/… #elixirTIL


#ElixirTIL: to delete keywords with nil values (i.e. compact) from a KeywordList or Map: my_kwlist |> Enum.reject( fn {_,v} -> is_nil(v) end) to do the same with a map: my_map |> Enum.reject( fn {_,v} -> is_nil(v) end) |> Enum.into(%{})


No results for "#elixirtil"

TIL: In Elixir, !! converts any value to its boolean equivalent. !!nil is false, !!value is true. Simple and useful feature i did not know about for longer than i should. #MyElixirStatus #ElixirTIL

wojciech_jestem's tweet image. TIL:
In Elixir, !! converts any value to its boolean equivalent. !!nil is false, !!value is true. Simple and useful feature i did not know about for longer than i should.
#MyElixirStatus #ElixirTIL

Loading...

Something went wrong.


Something went wrong.


United States Trends