OMG what's all this erlang malarky
Just picked up a copy of Programming Erlang from Pragmatic Programmers, and having a quick play in the console.
The story so far;
- lines are terminated by ‘.’
- variables are not variables (not quite) can only be assigned once
- = is not an assignment operator, it is a pattern matching operator
rl@bloodandguts:~$ erl
Erlang (BEAM) emulator version 5.6.3 [source] [64-bit] [smp:2] [async-threads:0] [kernel-poll:false]
Eshell V5.6.3 (abort with ^G)
1> % This is a comment
1> 123456.
123456
2> "a string".
"a string"
3> 3 + 4 * 6.
27
4> (3 + 4) * 6.
42
5> 16#cafe .
51966
6> 32#cafe .
403950
7> X = 12345.
12345
8> X * 3.
37035
9> X = "something else".
** exception error: no match of right hand side value "something else"