Changes

Jump to navigation Jump to search
97 bytes added ,  16:19, 26 August 2014
let $map := map { 'R': 'red', 'G': 'green', 'B': 'blue' }
return (
$map?* (: 1. returns all values ; equivalent to: map:keys($map) ! $map(.) :), $map?R (: 2. returns the value associated with the key 'R'; equivalent to : $map('R') :),
$map?('G','B') (: 4. returns the values associated with the key 'G' and 'B' :)
),
let $array := [ 'one', 'two', 'three' ]
return (
$array?* (: 1. returns all values ; equivalent to: (1 to array:size($array)) ! $array(.) :), $array?1 (: 3. returns the first value; equivalent to : $array(2) :),
$array?(2 to 3) (: 4. returns the values 2 and 3 :)
)
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu