You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crash-course.markdown
+6-14
Original file line number
Diff line number
Diff line change
@@ -327,31 +327,23 @@ lines.
327
327
"""
328
328
{% endhighlight %}
329
329
330
-
### Keyword list (Orddict)
330
+
### Keyword list
331
331
332
-
Orddicts in Erlang are created using either `orddict:new/0` or `orddict:from_list/1` while Elixir offers a literal syntax and calls them keyword lists:
332
+
Elixir offers a literal syntax for creating a list of two-item tuples where the first item in the tuple is an atom and calls them keyword lists:
Their internal representation is the same though. Both are made of a list of tuples.
354
-
355
347
### Records
356
348
357
349
The syntax for records differs significantly between Erlang and Elixir. Please refer to [this section][1] in the Erlang book to read a detailed introduction to records in Erlang. And [this chapter][2] from Elixir's Getting Started guide provides a description of records in Elixir.
@@ -500,7 +492,7 @@ When defining a function with the same name multiple times, each such definition
500
492
501
493
Elixir doesn't require punctuation to separate clauses, but they must be grouped together.
502
494
503
-
### Function Overloading
495
+
### Identifying functions
504
496
505
497
In both Erlang and Elixir, a function is not identified only by its name, but by its name and arity. In both examples below, we are defining four different functions (all named `sum`, but with different arity):
0 commit comments