     assoc>> set-at ;
 
 M: cache-assoc clear-assoc
-    [ assoc>> values dispose-each ]
-    [ assoc>> clear-assoc ]
-    bi ;
+    assoc>> [ values dispose-each ] [ clear-assoc ] bi ;
 
 M: cache-assoc >alist assoc>> [ value>> ] { } assoc-map-as ;
 

! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel assocs math accessors destructors fry sequences ;
IN: cache

TUPLE: cache-assoc < disposable assoc max-age ;

PRIVATE>

: purge-cache ( cache -- )
    [ assoc>> ] [ max-age>> ] bi '[
        [
            nip dup age>> 1 + [ >>age ] keep
            _ < [ drop t ] [ dispose, f ] if
        ] assoc-filter! drop
    ] { } make [ last rethrow ] unless-empty ;
