Permalink
Browse files

Improvements to crash course

  • Loading branch information...
1 parent d2e0d9d commit af6295954c8f2597938692fbdc1076b907d58ce9 @josevalim josevalim committed Jul 12, 2012
Showing with 1 addition and 23 deletions.
  1. +1 −23 crash-course.markdown
View
@@ -5,7 +5,7 @@ layout: default
# Erlang/Elixir Syntax: A Crash Course
-This is a quick introduction to the Elixir syntax for Erlang developers and vice-versa. It is the absolute minimum amount of knowledge you need in order to understand Erlang code, read the docs, sample code, etc.
+This is a quick introduction to the Elixir syntax for Erlang developers and vice-versa. It is the absolute minimum amount of knowledge you need in order to understand Elixir/Erlang code, read the docs, sample code, etc.
## Running Erlang code
@@ -668,28 +668,6 @@ case { x, y } do
end
{% endhighlight %}
-### Loop
-
-Elixir provides a convenient construct for loops which Erlang does not have. In
-general, it is better to use one of the functions provided by the ``Enum`` module
-or a list comprehension.
-
-{% highlight ruby %}
-loop [1, 2, 3, 4, 5], [] do
- [h|t], acc ->
- recur t, [h*h|acc]
- [], acc ->
- List.reverse acc
-end
-#=> [1, 4, 9, 16, 25]
-
-Enum.map [1, 2, 3, 4, 5], &1 * &1
-#=> [1, 4, 9, 16, 25]
-
-lc x in [1, 2, 3, 4, 5], do: x * x
-#=> [1, 4, 9, 16, 25]
-{% endhighlight %}
-
### Sending and Receiving Messages
The syntax for sending and receiving differs only slightly between Erlang and Elixir.

0 comments on commit af62959

Please sign in to comment.