]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: fix when-empty stack effect.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 10 Oct 2022 04:20:17 +0000 (21:20 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 10 Oct 2022 04:20:17 +0000 (21:20 -0700)
core/sequences/sequences.factor

index b3c5564764e2f9fdf0eaa2d5babaa742c4bfda36..aaebd6170818b11a8b257451856389a6a295fef5 100644 (file)
@@ -31,7 +31,7 @@ M: sequence shorten 2dup length < [ set-length ] [ 2drop ] if ; inline
 : if-empty ( ..a seq quot1: ( ..a -- ..b ) quot2: ( ..a seq -- ..b ) -- ..b )
     [ dup empty? ] [ [ drop ] prepose ] [ ] tri* if ; inline
 
-: when-empty ( ... seq quot: ( ... -- obj ) -- ... seq/obj ) [ ] if-empty ; inline
+: when-empty ( ... seq quot: ( ... -- ... obj ) -- ... seq/obj ) [ ] if-empty ; inline
 : unless-empty ( ... seq quot: ( ... seq -- ... ) -- ... ) [ ] swap if-empty ; inline
 
 : delete-all ( seq -- ) 0 swap set-length ;