Home Page | | | Project Status | | | Contribute | | | Guidelines and Information |
Syntax: | i = count(x, s)
|
Description: | Counts how often object x is contained in sequence s. |
Status: | PROPOSED |
Syntax: | i = depth(s)
|
Description: | Returns the "depth" of an object. An atom returns 0, a string returns 1, a composite sequence returns 2 or more depending on how many sequences containing sequences it has. (Ricardo Forno had posted such a function in March 2002 on EUforum.) |
Status: | PROPOSED |
Syntax: | s = find_all(x, s)
|
Description: | Like Euphoria's find(), but doesn't only return the first place where x was found in s, but a sequence that is a list of all places where x was found in s. |
Status: | PROPOSED |
Syntax: | s = flatten(s)
|
Description: | Takes a sequence of arbitrary depth, and returns its contents as flat sequence (depth = 1). (Derek Parnell had posted such a function in June 2003 on EUforum.) |
Status: | PROPOSED |
Syntax: | x = map(x, rid)
|
Description: | Applies the function pointed to by rid to every element of x unless x is an atom in which case it returns the function called with x. For this reason all functions that rid points to should ideally take objects. |
Status: | PROPOSED |
Syntax: | s = find_all(x, s)
|
Description: | Like Euphoria's match(), but doesn't only return the first place where x was matched in s, but a sequence that is a list of all places where x was matched in s. |
Status: | PROPOSED |
Syntax: | s = replace_element(s, x1, x2)
|
Description: | Replaces all occurances of x1 with x2 in source sequence s. In essence looks for all cases where find(x1, s) returns a value != 0, and replaces x1 with x2. |
Status: | PROPOSED |