tree_group

EveAndersson.com : API Browser : tree_group

tree_group

tree_group xs [ node_level ]
Defined in tcl/ad-trees.tcl

Divides a list into groups. The first element of the list provides the key value that starts a new group. Example: tree_group {1 2 3 2 1 2 1 1 2 2} = {1 2 3 2} {1 2} 1 {1 2 2} The optional argument node_level is a function that extracts the value of an element. By default, this is the identity function id. Example: tree_group {{a 1} {b 2} {c 1}} snd = {{a 1} {b 2}} {c 1}

Parameters:
xs
node_level (defaults to "id")
[ show source ]

Show another procedure:

eve@eveandersson.com