https://github.com/jrincayc/ucblogo-code
Revision 07fc868ecfd31fecc7c3f964730f946c31f5ab80 authored by Joshua J. Cogliati on 19 June 2020, 15:11:03 UTC, committed by Joshua J. Cogliati on 19 June 2020, 15:11:03 UTC
1 parent ecd99ed
Tip revision: 07fc868ecfd31fecc7c3f964730f946c31f5ab80 authored by Joshua J. Cogliati on 19 June 2020, 15:11:03 UTC
Fixing save load session file bug with code by pahihu.
Fixing save load session file bug with code by pahihu.
Tip revision: 07fc868
filter
FILTER tftemplate data (library procedure)
outputs a word or list, depending on the type of the data input,
containing a subset of the members (for a list) or characters (for
a word) of the input. The template is evaluated once for each
member or character of the data, and it must produce a TRUE or
FALSE value. If the value is TRUE, then the corresponding input
constituent is included in the output.
? print filter "vowelp "elephant
eea
?
In a template, the symbol ?REST represents the portion of the
data input to the right of the member currently being used as
the ? slot-filler. That is, if the data input is [A B C D E]
and the template is being evaluated with ? replaced by B, then
?REST would be replaced by [C D E].
In a template, the symbol # represents the position in the data
input of the member currently being used as the ? slot-filler.
That is, if the data input is [A B C D E] and the template is
being evaluated with ? replaced by B, then # would be replaced
by 2.
Computing file changes ...