Skip to main content
3 of 3
added 50 characters in body
nimi
  • 36k
  • 4
  • 35
  • 100

Haskell, 54 49 bytes

import Data.List g x=zipWith(\\)x$scanl(++)""$g x 

Try it online!

We build the output list by calculating pairwise the list difference (\\) of the input list and the cumulative append of the output list (starting with "").

input list: ONE TWO THREE SEVENTEEN cumulative append: "" +-> ONE +-> ONETW +-> ONETWHRE list difference (output): ONE -+ TW -+ HRE -+ SVEEN 

With both Data.List and Data.Function in scope (e.g. by using the lambdabot environment), this can be shortened to 30 bytes:

fix.(.scanl(++)"").zipWith(\\) 

Edit: -5 bytes thanks to @Sriotchilism O'Zaic.

nimi
  • 36k
  • 4
  • 35
  • 100