Hidden Features of Erlang
erlang, hidden-features
Solution
The magic commands in the shell. The full list is in the manual, but the ones I use most are:
- f() - forget all variables
- f(X) - forget X
- v(42) - recall result from line 42
- v(-1) - recall result from previous line
- e(-1) - reexecute expression on previous line
- rr(foo) - read record definitions from module foo
- rr("*/*") - read record definitions from every module in every subdirectory
- rp(expression) - print full expression with record formating
Problem
In the spirit of: - Hidden Features of C# - Hidden Features of Java - Hidden Features of ASP.NET - Hidden Features of Python - Hidden Features of HTML - and other Hidden Features questions What are the hidden features of Erlang that every Erlang developer should be aware of? One hidden feature per answer, please.