update core to use butlast, butlast-slice
parent
e771314833
commit
01f20cf32d
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue