]> gitweb.factorcode.org Git - factor.git/blobdiff - core/assocs/assocs.factor
sequences: add index-of-last
[factor.git] / core / assocs / assocs.factor
index 2f661e74815cbf4b827d0552a59860694ae120ba..bb9fd94c38cd201c70875509ac170c5530feb3e6 100644 (file)
@@ -142,7 +142,7 @@ M: assoc values [ nip ] { } assoc>map ;
     assoc-size 0 = ; inline
 
 : assoc-stack ( key seq -- value )
-    [ length 1 - ] keep assoc-stack-from ; flushable
+    index-of-last assoc-stack-from ; flushable
 
 : assoc-subset? ( assoc1 assoc2 -- ? )
     [ at* [ = ] [ 2drop f ] if ] with-assoc assoc-all? ;