Erlang notes

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:

One thought on “Erlang notes

  1. ingvald Post author

    more learned today:

    lists:foreach(
      fun(N) ->
       [some function taking f.ex N, with comma-separated expressions]
      end,
      lists:seq(1,10)
    ).

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>