Algosim documentation: label

label

Returns a structure containing the elements in a list labelled using a sequence of strings.

Syntax

Description

If L is a list of objects and names a list of the same length containing strings that are valid identifiers, then label(L, names) returns a structure with this many members, the names taken from names and the values from L (in order).

label(L, n1, n2, ...) is a shorthand notation for label(L, '(n1, n2, ...)).

Examples

L ≔ '("Albus Dumbledore", 105, "headmaster")
Albus Dumbledore
105
headmaster
label(L, "name", "age", "role")
name: Albus Dumbledore
age: 105
role: headmaster