update core to use butlast, butlast-slice

db4
Doug Coleman 2008-05-06 12:36:49 -05:00
parent e771314833
commit 01f20cf32d
5 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,7 @@ ERROR: bad-superclass class ;
dup tuple-predicate-quot define-predicate ;
: superclass-size ( class -- n )
superclasses 1 head-slice*
superclasses butlast-slice
[ slot-names length ] map sum ;
: generate-tuple-slots ( class slots -- slot-specs )

View File

@ -32,7 +32,7 @@ IN: inference.transforms
drop [ no-case ]
] [
dup peek quotation? [
dup peek swap 1 head*
dup peek swap butlast
] [
[ no-case ] swap
] if case>quot

View File

@ -114,7 +114,7 @@ unit-test
[ parse-fresh drop ] with-compilation-unit
[
"prettyprint.tests" lookup see
] with-string-writer "\n" split 1 head*
] with-string-writer "\n" split butlast
] keep =
] with-scope ;

View File

@ -284,7 +284,7 @@ M: colon unindent-first-line? drop t ;
! Long section layout algorithm
: chop-break ( seq -- seq )
dup peek line-break? [ 1 head-slice* chop-break ] when ;
dup peek line-break? [ butlast-slice chop-break ] when ;
SYMBOL: prev
SYMBOL: next

View File

@ -104,7 +104,7 @@ M: sliced-clumps nth group@ <slice> ;
1array
] [
"\n" split [
1 head-slice* [
butlast-slice [
"\r" ?tail drop "\r" split
] map
] keep peek "\r" split suffix concat