If you didn't define it, don't boa it
INSTANCE: slice-chunking sequence
M: slice-chunking nth group@ <slice> ; inline
INSTANCE: slice-chunking sequence
M: slice-chunking nth group@ <slice> ; inline
-M: slice-chunking nth-unsafe group@ slice boa ; inline
+M: slice-chunking nth-unsafe group@ <slice-unsafe> ; inline
MIXIN: abstract-groups
INSTANCE: abstract-groups sequence
MIXIN: abstract-groups
INSTANCE: abstract-groups sequence
collector [ each-match ] dip >array ; inline
: all-matching-slices ( string regexp -- seq )
collector [ each-match ] dip >array ; inline
: all-matching-slices ( string regexp -- seq )
- [ slice boa ] map-matches ;
+ [ <slice-unsafe> ] map-matches ;
: all-matching-subseqs ( string regexp -- seq )
[ subseq ] map-matches ;
: all-matching-subseqs ( string regexp -- seq )
[ subseq ] map-matches ;
:: first-match ( string regexp -- slice/f )
string regexp prepare-match-iterator do-next-match [
regexp reverse-regexp? [ [ 1 + ] bi@ ] when
:: first-match ( string regexp -- slice/f )
string regexp prepare-match-iterator do-next-match [
regexp reverse-regexp? [ [ 1 + ] bi@ ] when
] [ 2drop f ] if ;
: re-contains? ( string regexp -- ? )
prepare-match-iterator do-next-match [ 2drop ] dip >boolean ;
: re-split ( string regexp -- seq )
] [ 2drop f ] if ;
: re-contains? ( string regexp -- ? )
prepare-match-iterator do-next-match [ 2drop ] dip >boolean ;
: re-split ( string regexp -- seq )
- [ slice boa ] (re-split) ;
+ [ <slice-unsafe> ] (re-split) ;
: re-replace ( string regexp replacement -- result )
[ [ subseq ] (re-split) ] dip join ;
: re-replace ( string regexp replacement -- result )
[ [ subseq ] (re-split) ] dip join ;
[ 2drop 0 < ]
[ [ drop ] 2dip length > ]
[ drop > ]
[ 2drop 0 < ]
[ [ drop ] 2dip length > ]
[ drop > ]
- } 3|| [ 3drop f ] [ slice boa ] if ; inline
+ } 3|| [ 3drop f ] [ <slice-unsafe> ] if ; inline
:: take-sequence ( sequence-parser sequence -- obj/f )
sequence-parser [ n>> dup sequence length + ] [ sequence>> ] bi
:: take-sequence ( sequence-parser sequence -- obj/f )
sequence-parser [ n>> dup sequence length + ] [ sequence>> ] bi
[ new ] [ smart-tuple>array ] bi ; inline
: tuple-slice ( n seq -- slice )
[ new ] [ smart-tuple>array ] bi ; inline
: tuple-slice ( n seq -- slice )
- [ n>> [ * dup ] keep + ] [ seq>> ] bi slice boa ; inline
+ [ n>> [ * dup ] keep + ] [ seq>> ] bi <slice-unsafe> ; inline
: read-tuple ( slice class -- tuple )
'[ _ boa-unsafe ] input<sequence-unsafe ; inline
: read-tuple ( slice class -- tuple )
'[ _ boa-unsafe ] input<sequence-unsafe ; inline
: <slice> ( from to seq -- slice )
check-slice
dup slice? [ collapse-slice ] when
: <slice> ( from to seq -- slice )
check-slice
dup slice? [ collapse-slice ] when
+ <slice-unsafe> ; inline
M: slice virtual-exemplar seq>> ; inline
M: slice virtual-exemplar seq>> ; inline