1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel sequences assocs tools.test linked-assocs math ;
7 <linked-hash> 1 "b" pick set-at
14 <linked-hash> 1 "b" pick set-at
20 { { 2 3 4 } { "c" "a" "d" } 3 } [
21 <linked-hash> 1 "a" pick set-at
25 [ values ] [ keys ] [ assoc-size ] tri
29 <linked-hash> 1 "c" pick set-at
32 "c" over at swap assoc-size
36 <linked-hash> 1 "a" pick set-at
40 dup clear-assoc [ keys ] [ assoc-size ] bi
44 <linked-hash> dup clone
53 { [ 3 * ] [ 1- ] } "first" pick set-at
54 { [ [ 1- ] bi@ ] [ 2 / ] } "second" pick set-at
55 4 6 pick values [ first call ] each
56 + swap values <reversed> [ second call ] each