Difference between revisions of "KeepIf Command"
From GeoGebra Manual
(added v4 - example formatting) |
(added v4 - example formatting) |
||
Line 2: | Line 2: | ||
{{command|logical}} | {{command|logical}} | ||
; KeepIf[Condition, List]: Creates a new list that only contains those elements of the initial list that fulfill the condition. | ; KeepIf[Condition, List]: Creates a new list that only contains those elements of the initial list that fulfill the condition. | ||
− | : {{Example| < | + | : {{Example| <code>KeepIf[x<3, {1, 2, 3, 4, 1, 5, 6}]</code> returns the new list ''{1, 2, 1}''.}} |
Revision as of 18:23, 23 February 2011
- KeepIf[Condition, List]
- Creates a new list that only contains those elements of the initial list that fulfill the condition.
- Example:
KeepIf[x<3, {1, 2, 3, 4, 1, 5, 6}]
returns the new list {1, 2, 1}.