@@ -125,15 +125,15 @@ Using the function `foreach`, the function `broadcast` becomes:
125125foreach (fun (Pid ) -> Pid ! M end , L )
126126```
127127
128- `foreach ` is evaluated for its side - effect and not its value . `foreach (Fun , L )`
128+ `foreach ` is evaluated for its side - effect and not its value . `foreach (Fun , L )`
129129calls `Fun (X )` for each element `X ` in `L ` and the processing occurs in the
130130order that the elements were defined in `L `. `map ` does not define the order in
131131which its elements are processed .
132132
133133## Syntax of Funs
134134
135135Funs are written with the following syntax (see
136- [Fun Expressions ](`e :system :expressions .md # fun -expressions`)for full description):
136+ [Fun Expressions ](`e :system :expressions .md # fun -expressions`) for full description):
137137
138138```erlang
139139F = fun (Arg1, Arg2, ... ArgN) ->
@@ -249,7 +249,7 @@ diagnostic:
249249This indicates that the variable `File `, which is defined inside the fun ,
250250collides with the variable `File `, which is defined outside the fun .
251251
252- The rules for importing variables into a fun has the consequence that certain
252+ The rules for importing variables into a fun have the consequence that certain
253253pattern matching operations must be moved into guard expressions and cannot be
254254written in the head of the fun . For example , you might write the following code
255255if you intend the first clause of `F ` to be evaluated when the value of its
@@ -323,7 +323,7 @@ any(Pred, []) ->
323323A predicate is a function that returns `true` or `false`. `any` is `true` if
324324there is a term `X` in the list such that `P(X)` is `true`.
325325
326- A predicate `Big(X)` is defined, which is `true` if its argument is greater that
326+ A predicate `Big(X)` is defined, which is `true` if its argument is greater than
32732710:
328328
329329```erlang
@@ -489,7 +489,7 @@ diff(L1, L2) ->
489489
490490This gives the list of all elements in L1 that are not contained in L2.
491491
492- The AND intersection of the list `L1` and `L2` is also easily defined:
492+ The AND intersection of the lists `L1` and `L2` is also easily defined:
493493
494494```erlang
495495intersection(L1,L2) -> filter(fun(X) -> member(X,L1) end, L2).
@@ -537,7 +537,7 @@ dropwhile(Pred, []) ->
537537### splitwith
538538
539539`lists:splitwith/2` splits the list `L` into the two sublists `{L1 , L2 }`, where
540- `L = takewhile (P , L )` and `L2 = dropwhile (P , L )`:
540+ `L1 = takewhile (P , L )` and `L2 = dropwhile (P , L )`:
541541
542542```erlang
543543splitwith (Pred , L ) ->
@@ -561,7 +561,7 @@ splitwith(Pred, [], L) ->
561561
562562So far , only functions that take funs as arguments have been described . More
563563powerful functions , that themselves return funs , can also be written . The
564- following examples illustrate these type of functions .
564+ following examples illustrate these types of functions .
565565
566566### Simple Higher Order Functions
567567
@@ -619,7 +619,7 @@ Parser(Toks) -> {ok, Tree, Toks1} | fail
619619`{ok , Tree , Toks1 }`.
620620
621621- `Tree ` is a parse tree .
622- - `Toks1 ` is a tail of `Tree ` that contains symbols encountered after the
622+ - `Toks1 ` is a tail of `Toks ` that contains symbols encountered after the
623623 structure that was correctly parsed .
624624
625625An unsuccessful parse returns `fail `.
0 commit comments