annotate 5-Erlang/basic.erl @ 99:67631cb2ea48

Expand the last note on getting into the monad state
author IBBoard <dev@ibboard.co.uk>
date Sun, 30 Jun 2019 16:15:33 +0100
parents 32f018861e36
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
71
32f018861e36 Add Day 1 Erlang content
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 -module(basic). % Define the module name
32f018861e36 Add Day 1 Erlang content
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 -export([mirror/1]). % Note the Prolog-like notiation - "mirror function takes one parameter)
32f018861e36 Add Day 1 Erlang content
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 % Compilation is done from within "erl" using "c(module_name)"
32f018861e36 Add Day 1 Erlang content
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
32f018861e36 Add Day 1 Erlang content
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 % This function will be called as "basic:mirror(thing)"
32f018861e36 Add Day 1 Erlang content
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 mirror(Anything) -> Anything.