]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences.extras: fix pad-center output type.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Dec 2020 21:21:44 +0000 (13:21 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Dec 2020 21:21:44 +0000 (13:21 -0800)
extra/sequences/extras/extras.factor

index 2746c0d7339dffc7041c00a373f1387cd2a07727..be95883f3b05fe0fd04a42be604784395e89f8e4 100644 (file)
@@ -63,7 +63,8 @@ IN: sequences.extras
 
 : pad-center ( seq n elt -- padded )
     swap pick length [-] [ drop ] [
-        [ 2/ ] [ over - ] bi rot '[ _ <repetition> ] bi@ surround
+        [ 2/ ] [ over - ] bi rot '[ _ <repetition> ] bi@
+        pick surround-as
     ] if-zero ;
 
 : change-nths ( ... indices seq quot: ( ... elt -- ... elt' ) -- ... )