INSTANCE: f immutable-sequence
! Integers support the sequence protocol
-M: integer length ; inline
-M: integer nth-unsafe drop ; inline
+! M: integer length ; inline
+! M: integer nth-unsafe drop ; inline
-INSTANCE: integer immutable-sequence
+! INSTANCE: integer immutable-sequence
PRIVATE>
over map-as ; inline
: replicate ( seq quot -- newseq )
- [ drop ] prepose map ; inline
+ [ iota ] dip [ drop ] prepose map ; inline
: replicate-as ( seq quot exemplar -- newseq )
+ [ iota ] 2dip
[ [ drop ] prepose ] dip map-as ; inline
: change-each ( seq quot -- )