basedpl

— Replicate / Reduce first

N⌿Y replicates first-axis cells.

1 0⌿2 3⍴⍳6         ⍝ 1 3⍴1 2 3

f⌿Y reduces the first axis.

+⌿2 3⍴⍳6           ⍝ 5 7 9

S f⌿Y starts each lane from the whole seed S on the right.

10+⌿3 2⍴⍳6         ⍝ 19 22

Counts, identities and [K] follow /.