diff --git a/collections/sequences/extras/extras-tests.factor b/collections/sequences/extras/extras-tests.factor index 9df9c0aec7..0637bd74b3 100644 --- a/collections/sequences/extras/extras-tests.factor +++ b/collections/sequences/extras/extras-tests.factor @@ -259,4 +259,4 @@ IN: sequences.extras.tests [ 3 { 1 1 2 1 1 1 } [ 2 = not ] head-nth-match ] unit-test { { 1 1 2 1 } { 1 1 } } -[ 3 { 1 1 2 1 1 1 } [ 2 = not ] cut-nth-match ] unit-test \ No newline at end of file +[ 3 { 1 1 2 1 1 1 } [ 2 = not ] cut-nth-match ] unit-test diff --git a/core/modern/out/out.factor b/core/modern/out/out.factor index 7a7c90d58f..a19a499bf4 100644 --- a/core/modern/out/out.factor +++ b/core/modern/out/out.factor @@ -233,10 +233,6 @@ M: compound-sequence-literal write-literal call ] if ; inline recursive -: rewrite-path ( path quot -- ) - ! dup print - $[ [ path>literals [ _ map-literals ] map ] [ ] bi write-modern-path ] - [ drop . ] recover ; inline GENERIC: split-arity ( obj -- seq ) ; @@ -254,6 +250,17 @@ M: less-than-literal split-arity M: object split-arity ; + +: rewrite-path ( path quot -- ) + ! dup print + $[ + [ + path>literals + [ _ map-literals ] map + [ split-arity ] map + ] [ ] bi write-modern-path ] + [ drop . ] recover ; inline + : rewrite-string ( string quot -- ) ! dup print [ string>literals ] dip $[ _ map-literals ] map