Skip to content

Commit a532078

Browse files
chetkhatrijosevalim
authored andcommitted
Implemented readability of code at crash course at Elixir-lang (elixir-lang#1015)
1 parent 769acdf commit a532078

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

crash-course.markdown

+8-2
Original file line numberDiff line numberDiff line change
@@ -634,13 +634,19 @@ Anonymous functions are first-class values, so they can be passed as arguments t
634634
**Erlang**
635635

636636
```erlang
637+
% math.erl
637638
-module(math).
638639
-export([square/1]).
639640

640641
square(X) -> X * X.
642+
```
641643

642-
lists:map(fun math:square/1, [1, 2, 3]).
643-
%=> [1, 4, 9]
644+
```erl
645+
Eshell V5.9 (abort with ^G)
646+
1> c(math).
647+
{ok,math}
648+
2> lists:map(fun math:square/1, [1, 2, 3]).
649+
[1,4,9]
644650
```
645651

646652
**Elixir**

0 commit comments

Comments
 (0)