Quantcast
Channel: Variable assignment in Elixir - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Hynek -Pichi- Vychodil for Variable assignment in Elixir

$
0
0

Yes, Elixir doesn't follow the same concept as Erlang in this regard. Elixir tries to be more accessible for developers less familiar with functional programming, especially Ruby developers. According to Pattern matching documentation you have to pin variable:

iex(1)> x=44iex(2)> ^x=2** (MatchError) no match of right hand side value: 2

Also, note that variables have to start with a lower case in Elixir.


Viewing all articles
Browse latest Browse all 3

Trending Articles