Can anyone tell me what this means? I am new to this and my friend recommended me to post in this website. By the way I'm new to Erlang.
If possible I want to write a code in editor and I don't even understand the question any sample input/output and how it works an explanation will do. Thankyou
Here's a simple example showing how to use function clauses, then case statements to do the same thing. Put the following code in a file named
a.erlin some directory:Note that the file name,
a.erland the module directive:must match. So, if you named your file
homework1.erl, then the module directive in the file must be:To save a lot of typing, it's best to use very short module names (as you will see below).
In a terminal window, switch directories to the directory containing
a.erl:then launch the erlang shell:
Next, execute the following statements:
Note the syntax for calling a function defined in a file/module: