Ƥ - Prefixes
The resulting link is monadic, meaning it takes one argument. Note that the arity refers to that of the resulting link, not the number of links this quick consumes.
Apply a link to prefixes or to overlapping infixes / outfixes.
If the link right before
Ƥ is a nilad, apply to overlapping infixes / outfixes of size
n. For positive
n, split the list into overlapping chunks of length
n (identical to
ṡ (Split (Length, Overlapping))) and apply to each sublist. For negative
n, instead of reducing each sublist, slice and remove chunks of length
-n. For example,
5R ¹-2Ƥ returns
[[3, 4, 5], [1, 4, 5], [1, 2, 5], [1, 2, 3]] - in the first list,
[1, 2] is removed, in the second list,
[2, 3] is removed, etc.
Otherwise, simply apply the link to each prefix.
a,b,c,... SƤ is equivalent to
[[a] S, [a, b] S, [a, b, c] S, ...].
<monad>Ƥ- apply to prefixes
<monad><nilad>Ƥ- apply to overlapping in/out-fixes