Skip to main content
Commonmark migration
Source Link

#Perl 6, 28 25 bytes

Perl 6, 28 25 bytes

{.flat.sort.rotor(+.[0])}

This takes a list of lists (not arrays).

#Perl 6, 28 25 bytes

{.flat.sort.rotor(+.[0])}

This takes a list of lists (not arrays).

Perl 6, 28 25 bytes

{.flat.sort.rotor(+.[0])}

This takes a list of lists (not arrays).

deleted 259 characters in body
Source Link
Hotkeys
  • 1.1k
  • 5
  • 12

#Perl 6, 2828 25 bytes

{$^a.flat.sort.rotor($a[0]+.[0])}

This takes a list of lists (not arrays).
It works exactly like it looks. .rotor($a[0]) splits the given list into chunks of length $a[0], except $a[0] in this case is a list, which when used in a numeric context evaluates to the length of the list, which is the width of the matrix in this case.

#Perl 6, 28 bytes

{$^a.flat.sort.rotor($a[0])}

This takes a list of lists (not arrays).
It works exactly like it looks. .rotor($a[0]) splits the given list into chunks of length $a[0], except $a[0] in this case is a list, which when used in a numeric context evaluates to the length of the list, which is the width of the matrix in this case.

#Perl 6, 28 25 bytes

{.flat.sort.rotor(+.[0])}

This takes a list of lists (not arrays).

Source Link
Hotkeys
  • 1.1k
  • 5
  • 12

#Perl 6, 28 bytes

{$^a.flat.sort.rotor($a[0])}

This takes a list of lists (not arrays).
It works exactly like it looks. .rotor($a[0]) splits the given list into chunks of length $a[0], except $a[0] in this case is a list, which when used in a numeric context evaluates to the length of the list, which is the width of the matrix in this case.