llists (library)

Usage and interface

Documentation on exports

PREDICATE

Usage:

Concatenates a list of lists into a list.

  • Call and exit should be compatible with:
    (basic_props:list/2)Arg1 is a list of lists.
    (basic_props:list/1)Arg2 is a list.

PREDICATE

Usage:

Flattens out nested lists into a list.

  • Call and exit should be compatible with:
    (basic_props:list/1)Arg2 is a list.
  • The following properties should hold at call time:
    (basic_props:term/1)Arg1 is any term.
  • The following properties should hold upon exit:
    (basic_props:list/1)Arg2 is a list.

PREDICATE

Usage:

Collects in a list the singletons lists appearing in a list of lists.

  • Call and exit should be compatible with:
    (basic_props:list/1)Arg2 is a list.
  • The following properties should hold at call time:
    (basic_props:list/2)Arg1 is a list of lists.
  • The following properties should hold upon exit:
    (basic_props:list/1)Arg2 is a list.

PREDICATE

Usage:

Transposes a list of lists, that is, viewing it as a matrix changes rows by columns.

  • Call and exit should be compatible with:
    (basic_props:list/2)Arg2 is a list of lists.
  • The following properties should hold at call time:
    (basic_props:list/2)Arg1 is a list of lists.
  • The following properties should hold upon exit:
    (basic_props:list/2)Arg2 is a list of lists.
General properties:

Test:transpose(X,Y)

Transpose a non numeric matrix.

  • If the following properties should hold at call time:
    (term_basic:= /2)term_basic:X=[[aaa,bbb,ccc],[ddd,eee,fff]]
    then the following properties should hold upon exit:
    (term_compare:== /2)The terms Y and [[aaa,ddd],[bbb,eee],[ccc,fff]] are strictly identical.

Test:transpose(X,Y)

Transpose a 2x1 matrix.

  • If the following properties should hold at call time:
    (term_basic:= /2)term_basic:X=[[1.0,2.0]]
    then the following properties should hold upon exit:
    (term_compare:== /2)The terms Y and [[1.0],[2.0]] are strictly identical.