# slice Sub-range of a list or string. For strings the indices are CODEPOINTS — slicing never lands mid-character (mojibake is impossible). Negative indices count from the end; nil start/end mean 0/length. `$s(a..b)` is sugar for `[slice $s a b]`. ## Syntax
[slice $coll $start $end]
$s($start .. $end)
## Examples
[slice "a中c" 1 2]     # "中"
$a(1 ..)               # rest
[slice @{a b c d} 1 3] # @{b c}
[bytes/slice $bin 0 4] # raw byte range (binary data)
## Returns List or string. ## See Also `bytes/slice`, `nth`, `take`, `drop`, `chars/slice`