values

values(collection)

Return an iterator over all values in a collection. collect(values(d)) returns an array of values.

Examples

julia> dict = Dict(["one"=> 1, "two"=> 2, "three"=> 3])
       values(dict)
ValueIterator for a Dict{ASCIIString,Int64} with 3 entries. Values:
  2
  1
  3
julia> dict = {"A"=>1, "B"=>2, "C"=>3, "D"=>4};
julia> bar = collect(values(dict))                 # convert from ValueIterator to Array
4-element Array{Any,1}:
 2
 1
 3
 4

julia> reduce(*,bar)            # 2 * 1 * 3 * 4
24

julia> foldr(-,bar)         # (2 - (1 - (3 - 4)))
0

See Also

append!, delete!, deleteat!, empty!, endof, filter, filter!, gc, get!, getkey, haskey, insert!, isempty, keys, map, map!, merge, merge!, pop!, prepend!, push!, reduce, resize!, shift!, splice!, unshift!, values,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: