diff options
Diffstat (limited to 'system/doc')
-rw-r--r-- | system/doc/programming_examples/list_comprehensions.xml | 4 | ||||
-rw-r--r-- | system/doc/programming_examples/records.xml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/system/doc/programming_examples/list_comprehensions.xml b/system/doc/programming_examples/list_comprehensions.xml index 706cb337ad..f9ce57f478 100644 --- a/system/doc/programming_examples/list_comprehensions.xml +++ b/system/doc/programming_examples/list_comprehensions.xml @@ -40,10 +40,10 @@ <c>[1,2,a,...]</c> and X is greater than 3.</p> <p>The notation <c><![CDATA[X <- [1,2,a,...]]]></c> is a generator and the expression <c>X > 3</c> is a filter.</p> - <p>An additional filter, <c>integer(X)</c>, can be added to restrict + <p>An additional filter, <c>is_integer(X)</c>, can be added to restrict the result to integers:</p> <pre> -> <input>[X || X <- [1,2,a,3,4,b,5,6], integer(X), X > 3].</input> +> <input>[X || X <- [1,2,a,3,4,b,5,6], is_integer(X), X > 3].</input> [4,5,6]</pre> <p>Generators can be combined. For example, the Cartesian product of two lists can be written as follows:</p> diff --git a/system/doc/programming_examples/records.xml b/system/doc/programming_examples/records.xml index d74ce22e4e..04c06816c5 100644 --- a/system/doc/programming_examples/records.xml +++ b/system/doc/programming_examples/records.xml @@ -222,7 +222,7 @@ print(#person{name = Name, age = Age, %% Demonstrates type testing, selector, updating. -birthday(P) when record(P, person) -> +birthday(P) when is_record(P, person) -> P#person{age = P#person.age + 1}. register_two_hackers() -> |