Skip to main content
1 of 2
Dominic van Essen
  • 36.4k
  • 2
  • 22
  • 60

R, 32 bytes

function(x)split(x,(x-seq(x))^2)

Try it online!

Dominic van Essen
  • 36.4k
  • 2
  • 22
  • 60