tried Erlang in cyber-dojo.org on Friday, and learned a few basic things..
- export..
- functions can be defined several times based on single instances or patterns in parameters
- function pattern via: “… when Parameter > 1” (f.ex)
- function parameter: start with capital letter…
- separate function definitions with “;”, after last one: “.”
- for default function definition: “(_)”
- in eunit: methods ending in _test() will be run
a few resources:
more learned today:
lists:foreach(
fun(N) ->
[some function taking f.ex N, with comma-separated expressions]
end,
lists:seq(1,10)
).