sequences: change trim-head to not call length unless it needs to.
parent
b910ca090c
commit
d87a1da62f
|
@ -985,8 +985,8 @@ PRIVATE>
|
|||
<PRIVATE
|
||||
|
||||
: (trim-head) ( seq quot -- seq n )
|
||||
over [ [ not ] compose find drop ] dip
|
||||
[ length or ] keep swap ; inline
|
||||
over [ [ not ] compose find drop ] dip swap
|
||||
[ dup length ] unless* ; inline
|
||||
|
||||
: (trim-tail) ( seq quot -- seq n )
|
||||
over [ [ not ] compose find-last drop ?1+ ] dip
|
||||
|
|
Loading…
Reference in New Issue