Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions | Variables

Functions

const afw_value_tafw_function_execute_add_entries (afw_function_execute_t *x)
 Adaptive Function add_entries More...
 
const afw_value_tafw_function_execute_join (afw_function_execute_t *x)
 Adaptive Function join More...
 
const afw_value_tafw_function_execute_list (afw_function_execute_t *x)
 Adaptive Function list More...
 
const afw_value_tafw_function_execute_reverse (afw_function_execute_t *x)
 Adaptive Function reverse More...
 
const afw_value_tafw_function_execute_slice (afw_function_execute_t *x)
 Adaptive Function slice More...
 

Variables

 afw_function_definition_add_entries
 Function definition add_entries.
 
 afw_function_definition_bag_list
 Function definition bag<list>
 
 afw_function_definition_bag_size_list
 Adaptive Function bag<list> More...
 
 afw_function_definition_clone_list
 Adaptive Function bag_size<list> More...
 
 afw_function_definition_eq_list
 Adaptive Function clone<list> More...
 
 afw_function_definition_eqx_list
 Adaptive Function eq<list> More...
 
 afw_function_definition_ge_list
 Adaptive Function eqx<list> More...
 
 afw_function_definition_gt_list
 Adaptive Function ge<list> More...
 
 afw_function_definition_includes_list
 Adaptive Function gt<list> More...
 
 afw_function_definition_is_list
 Adaptive Function includes<list> More...
 
 afw_function_definition_join
 Adaptive Function is<list> More...
 
 afw_function_definition_le_list
 Function definition le<list>
 
 afw_function_definition_length_list
 Adaptive Function le<list> More...
 
 afw_function_definition_list
 Adaptive Function length<list> More...
 
 afw_function_definition_lt_list
 Function definition lt<list>
 
 afw_function_definition_ne_list
 Adaptive Function lt<list> More...
 
 afw_function_definition_nex_list
 Adaptive Function ne<list> More...
 
 afw_function_definition_reverse
 Adaptive Function nex<list> More...
 
 afw_function_definition_slice
 Function definition slice.
 
 afw_function_definition_to_string_list
 Function definition to_string<list>
 

Detailed Description

list adaptive functions.

Function Documentation

◆ afw_function_execute_add_entries()

const afw_value_t* afw_function_execute_add_entries ( afw_function_execute_t x)

Adaptive Function add_entries

Parameters
xfunction 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:

function add_entries(
target: list,
source_1: list,
...source_rest: (list of list)
): list;

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.

◆ afw_function_execute_join()

const afw_value_t* afw_function_execute_join ( afw_function_execute_t x)

Adaptive Function join

Parameters
xfunction 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:

function join(
value: list,
separator?: string
): string;

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.

◆ afw_function_execute_list()

const afw_value_t* afw_function_execute_list ( afw_function_execute_t x)

Adaptive Function list

Parameters
xfunction 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:

function list(
...values: (list of any)
): list;

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.

◆ afw_function_execute_reverse()

const afw_value_t* afw_function_execute_reverse ( afw_function_execute_t x)

Adaptive Function reverse

Parameters
xfunction 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:

function reverse(
list: list
): list;

Parameters:

list - (list) A list to reverse.

Returns:

(list) A list with elements reversed.

Definition at line 367 of file afw_function_list.c.

◆ afw_function_execute_slice()

const afw_value_t* afw_function_execute_slice ( afw_function_execute_t x)

Adaptive Function slice

Parameters
xfunction 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:

function slice(
list: list,
startIndex?: integer,
endIndex?: integer
): list;

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.

Variable Documentation

◆ afw_function_definition_bag_size_list

afw_function_definition_bag_size_list

Adaptive Function bag<list>

Parameters
xfunction 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:

function bag<list>(
...values: (list of (list list))
): (list list);

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

afw_function_definition_clone_list

Adaptive Function bag_size<list>

Parameters
xfunction 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:

function bag_size<list>(
value: (list list)
): integer;

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

afw_function_definition_eq_list

Adaptive Function clone<list>

Parameters
xfunction 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:

function clone<list>(
value: list
): list;

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

afw_function_definition_eqx_list

Adaptive Function eq<list>

Parameters
xfunction 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:

function eq<list>(
arg1: list,
arg2: any
): boolean;

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

afw_function_definition_ge_list

Adaptive Function eqx<list>

Parameters
xfunction 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:

function eqx<list>(
arg1: list,
arg2: any
): boolean;

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

afw_function_definition_gt_list

Adaptive Function ge<list>

Parameters
xfunction 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:

function ge<list>(
arg1: list,
arg2: list
): boolean;

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

afw_function_definition_includes_list

Adaptive Function gt<list>

Parameters
xfunction 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:

function gt<list>(
arg1: list,
arg2: list
): boolean;

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

afw_function_definition_is_list

Adaptive Function includes<list>

Parameters
xfunction 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:

function includes<list>(
list: list,
searchElement: any,
fromIndex?: integer
): boolean;

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

afw_function_definition_join

Adaptive Function is<list>

Parameters
xfunction 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:

function is<list>(
value: any
): boolean;

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

afw_function_definition_length_list

Adaptive Function le<list>

Parameters
xfunction 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:

function le<list>(
arg1: list,
arg2: any
): boolean;

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

afw_function_definition_list

Adaptive Function length<list>

Parameters
xfunction 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:

function length<list>(
value: list
): integer;

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

afw_function_definition_ne_list

Adaptive Function lt<list>

Parameters
xfunction 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:

function lt<list>(
arg1: list,
arg2: list
): boolean;

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

afw_function_definition_nex_list

Adaptive Function ne<list>

Parameters
xfunction 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:

function ne<list>(
arg1: list,
arg2: any
): boolean;

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

afw_function_definition_reverse

Adaptive Function nex<list>

Parameters
xfunction 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:

function nex<list>(
arg1: list,
arg2: any
): boolean;

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.