(rontolisp) docs
← cl Package Functions

fill

(fill sequence item &key start end)

Stores item into every element of sequence between :start (default 0) and :end (default the length; nil means the same) and returns the sequence. A bound outside the sequence -- negative, not an integer, past its length, or a start past its end -- signals a type-error before anything is written. Destructive, as in CL: a vector -- a general one, a packed (unsigned-byte 8|16|32) or float vector, or a string allocated by make-string or make-array :element-type 'character -- is written in place, and so is a list. A string LITERAL is supported too, but a literal denotes a source constant that is never written on any backend: the fill lands on a fresh string, which comes back as the return value, and sequence itself is left holding the original -- the same rule as replace. Available on all backends except --no-gc.