Skip to main content
Commonmark migration
Source Link

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

###Explanation

Explanation

"         % Implicit input: cell array of strings. For each cell
  @g      %   Push content of current cell, that is, a word
  XH      %   Copy into clipboard H
  "       %   For each letter
    H     %     Push word
    X@    %     Push iteration index
    Jh)   %     Index from that until the end into current word
  ]       %   End
  0       %   Push 0. Will be cast to char. Char(0) is displayed as space
  &h      %   Concatenate horizontally all elements so far. Implicit display

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

###Explanation

"         % Implicit input: cell array of strings. For each cell
  @g      %   Push content of current cell, that is, a word
  XH      %   Copy into clipboard H
  "       %   For each letter
    H     %     Push word
    X@    %     Push iteration index
    Jh)   %     Index from that until the end into current word
  ]       %   End
  0       %   Push 0. Will be cast to char. Char(0) is displayed as space
  &h      %   Concatenate horizontally all elements so far. Implicit display

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

Explanation

"         % Implicit input: cell array of strings. For each cell
  @g      %   Push content of current cell, that is, a word
  XH      %   Copy into clipboard H
  "       %   For each letter
    H     %     Push word
    X@    %     Push iteration index
    Jh)   %     Index from that until the end into current word
  ]       %   End
  0       %   Push 0. Will be cast to char. Char(0) is displayed as space
  &h      %   Concatenate horizontally all elements so far. Implicit display
added 565 characters in body
Source Link
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

###Explanation

"         % Implicit input: cell array of strings. For each cell
  @g      %   Push content of current cell, that is, a word
  XH      %   Copy into clipboard H
  "       %   For each letter
    H     %     Push word
    X@    %     Push iteration index
    Jh)   %     Index from that until the end into current word
  ]       %   End
  0       %   Push 0. Will be cast to char. Char(0) is displayed as space
  &h      %   Concatenate horizontally all elements so far. Implicit display

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

###Explanation

"         % Implicit input: cell array of strings. For each cell
  @g      %   Push content of current cell, that is, a word
  XH      %   Copy into clipboard H
  "       %   For each letter
    H     %     Push word
    X@    %     Push iteration index
    Jh)   %     Index from that until the end into current word
  ]       %   End
  0       %   Push 0. Will be cast to char. Char(0) is displayed as space
  &h      %   Concatenate horizontally all elements so far. Implicit display
deleted 8 characters in body
Source Link
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

MATL, 1818 16 bytes

Yb"@gXH"HX@Jh"@gXH"HX@Jh)]0&h

Try it online! Input is a cell array of words. Try it online!

MATL, 18 bytes

Yb"@gXH"HX@Jh)]0&h

Try it online!

MATL, 18 16 bytes

"@gXH"HX@Jh)]0&h

Input is a cell array of words. Try it online!

Source Link
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372
Loading