Adaptive Framework
0.9.0
|
Functions | |
const afw_value_t * | afw_function_execute_add_entries (afw_function_execute_t *x) |
Adaptive Function add_entries More... | |
const afw_value_t * | afw_function_execute_join (afw_function_execute_t *x) |
Adaptive Function join More... | |
const afw_value_t * | afw_function_execute_list (afw_function_execute_t *x) |
Adaptive Function list More... | |
const afw_value_t * | afw_function_execute_reverse (afw_function_execute_t *x) |
Adaptive Function reverse More... | |
const afw_value_t * | afw_function_execute_slice (afw_function_execute_t *x) |
Adaptive Function slice More... | |
list adaptive functions.
const afw_value_t* afw_function_execute_add_entries | ( | afw_function_execute_t * | x | ) |
Adaptive Function add_entries
x | function execute parameter. |
Add the entries of one or more lists to another.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
target - (list) Target list. This list must not be immutable.
source - (1 or more list) Source list(s).
Returns:
(list) The modified target list.
Definition at line 51 of file afw_function_list.c.
const afw_value_t* afw_function_execute_join | ( | afw_function_execute_t * | x | ) |
Adaptive Function join
x | function execute parameter. |
Concatenate the string values of the elements of a list with a separator.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (list) A list of values of any data type.
separator - (optional string) The separator to use. If not specified, a comma (,) is used.
Returns:
(string) Joined list values.
Definition at line 270 of file afw_function_list.c.
const afw_value_t* afw_function_execute_list | ( | afw_function_execute_t * | x | ) |
Adaptive Function list
x | function execute parameter. |
Construct a list with 0 or more elements.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
values - (0 or more any dataType) A value can refer to any adaptable value belonging to any data type or a list expression. In the case of a list expression, indicated by "..." followed by an expression that results in a list, every element within that list is included in the newly created list.
Returns:
(list) The constructed list.
Errors thrown:
cast_error - value could not be converted
Definition at line 116 of file afw_function_list.c.
const afw_value_t* afw_function_execute_reverse | ( | afw_function_execute_t * | x | ) |
Adaptive Function reverse
x | function execute parameter. |
Reverse the order of the elements in a list. If the list is typed, the resulting list will be the same type.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
list - (list) A list to reverse.
Returns:
(list) A list with elements reversed.
Definition at line 367 of file afw_function_list.c.
const afw_value_t* afw_function_execute_slice | ( | afw_function_execute_t * | x | ) |
Adaptive Function slice
x | function execute parameter. |
This function extracts a consecutive slice of values from a list.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
list - (list) The list to slice.
startIndex - (optional integer) This is the zero based starting index. Use negative number to index from the end of the list. If not specified, an index of 0 is assumed.
endIndex - (optional integer) This is the zero based ending index. If positive, this is one more than the index of the last value to include in the list. If negative, the index is from the end of the list. If not specified, the slice is from startIndex up to and including the end of the list.
Returns:
(list) A list containing the selected values. If all of the values are the same data type, the list will be a list of that data type.
Definition at line 435 of file afw_function_list.c.
afw_function_definition_bag_size_list |
Adaptive Function bag<list>
x | function execute parameter. |
Takes any number of list values and returns a list of list.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
values - (0 or more list list)
Returns:
(list list)
Implemented by afw_function_execute_bag()
Function definition bag_size<list>
Definition at line 16128 of file afw_function_bindings.h.
afw_function_definition_clone_list |
Adaptive Function bag_size<list>
x | function execute parameter. |
This returns the integer number of values in list.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (list list)
Returns:
(integer)
Implemented by afw_function_execute_bag_size()
Function definition clone<list>
Definition at line 16162 of file afw_function_bindings.h.
afw_function_definition_eq_list |
Adaptive Function clone<list>
x | function execute parameter. |
Deep clone a list value.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (list) The list value to clone.
Returns:
(list) The cloned list value.
Implemented by afw_function_execute_clone()
Function definition eq<list>
Definition at line 16196 of file afw_function_bindings.h.
afw_function_definition_eqx_list |
Adaptive Function eq<list>
x | function execute parameter. |
Determine if list arg1 is equal to the value of arg2 converted to the data type of arg1 then return the boolean result. Use "eqx" ("===") instead if you want false to be returned if arg1 and arg2's data type don't match.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (any dataType)
Returns:
(boolean)
Errors thrown:
conversion - arg2 cannot be converted to the data type of arg1.
Implemented by afw_function_execute_eq()
Function definition eqx<list>
Definition at line 16239 of file afw_function_bindings.h.
afw_function_definition_ge_list |
Adaptive Function eqx<list>
x | function execute parameter. |
Determine if for list arg1 is equal to the value and data type of arg2 then return the boolean result. Use "eq" ("==") instead if you want arg2 to be converted to the data type of arg1 before comparison.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (any dataType)
Returns:
(boolean)
Implemented by afw_function_execute_eqx()
Function definition ge<list>
Definition at line 16278 of file afw_function_bindings.h.
afw_function_definition_gt_list |
Adaptive Function ge<list>
x | function execute parameter. |
Checks for list arg1 is greater than or equal to list arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (list)
Returns:
(boolean)
Implemented by afw_function_execute_ge()
Function definition gt<list>
Definition at line 16316 of file afw_function_bindings.h.
afw_function_definition_includes_list |
Adaptive Function gt<list>
x | function execute parameter. |
Checks for list arg1 is greater than list arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (list)
Returns:
(boolean)
Implemented by afw_function_execute_gt()
Function definition includes<list>
Definition at line 16354 of file afw_function_bindings.h.
afw_function_definition_is_list |
Adaptive Function includes<list>
x | function execute parameter. |
Checks whether or not a list contains any value.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
list - (<Type>
) The list to search.
searchElement - (any dataType) Element to find.
fromIndex - (optional integer) Index in the list to start search.
Returns:
(boolean) Indicates if the element is found in list.
Implemented by afw_function_execute_includes_list()
Function definition is<list>
Definition at line 16394 of file afw_function_bindings.h.
afw_function_definition_join |
Adaptive Function is<list>
x | function execute parameter. |
Checks whether value is dataType list and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (any dataType) Value to check.
Returns:
(boolean)
Implemented by afw_function_execute_is()
Function definition join
Definition at line 16428 of file afw_function_bindings.h.
afw_function_definition_length_list |
Adaptive Function le<list>
x | function execute parameter. |
Checks for list arg1 is less than or equal to list arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (any dataType)
Returns:
(boolean)
Implemented by afw_function_execute_le()
Function definition length<list>
Definition at line 16503 of file afw_function_bindings.h.
afw_function_definition_list |
Adaptive Function length<list>
x | function execute parameter. |
This is a polymorphic function where list can be any of the supported data types. Return the integer number of entries in datatype list or codepoints in others.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (list) Returns the number of entries in a list or code points in others.
Returns:
(integer)
Implemented by afw_function_execute_length()
Function definition list
Definition at line 16540 of file afw_function_bindings.h.
afw_function_definition_ne_list |
Adaptive Function lt<list>
x | function execute parameter. |
Checks for list arg1 is less that list arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (list)
Returns:
(boolean)
Implemented by afw_function_execute_lt()
Function definition ne<list>
Definition at line 16618 of file afw_function_bindings.h.
afw_function_definition_nex_list |
Adaptive Function ne<list>
x | function execute parameter. |
Determine if list arg1 is not equal to the value of arg2 converted to the data type of arg1 then return the boolean result. Use "nex" ("!==") instead if you want true to be returned if arg1 and arg2's data type don't match.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (any dataType)
Returns:
(boolean)
Errors thrown:
conversion - arg2 cannot be converted to the data type of arg1.
Implemented by afw_function_execute_ne()
Function definition nex<list>
Definition at line 16661 of file afw_function_bindings.h.
afw_function_definition_reverse |
Adaptive Function nex<list>
x | function execute parameter. |
Determine if for list arg1 is not equal to the value or data type of arg2 then return the boolean result. Use "ne" ("!=") instead if you want arg2 to be converted to the data type of arg1 before comparison.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (list)
arg2 - (any dataType)
Returns:
(boolean)
Implemented by afw_function_execute_nex()
Function definition reverse
Definition at line 16700 of file afw_function_bindings.h.