]> gitweb.factorcode.org Git - factor.git/commitdiff
add max-length word
authorSlava Pestov <slava@factorcode.org>
Sun, 23 Oct 2005 22:33:40 +0000 (22:33 +0000)
committerSlava Pestov <slava@factorcode.org>
Sun, 23 Oct 2005 22:33:40 +0000 (22:33 +0000)
library/collections/sequence-combinators.factor

index ef818234811974a93198e297e5a0aa0d4e218e5f..2d671047a066b4c3f266ed6fa32a7a02733cac1f 100644 (file)
@@ -69,6 +69,9 @@ M: object map ( seq quot -- seq )
 : min-length ( seq seq -- n )
     [ length ] 2apply min ; flushable
 
+: max-length ( seq seq -- n )
+    [ length ] 2apply max ; flushable
+
 : 2each ( seq seq quot -- )
     #! Don't use with lists.
     -rot 2dup min-length [ (2each) ] repeat 3drop ; inline