Given two strings/an array of strings, output the first string slowly shrinking and expanding back into the second string.
You can assume the strings will always start with the same character.
Input: "Test", "Testing" Output: Test Tes Te T Te Tes Test Testi Testin Testing
First you output the first word:
Then you keep removing one letter until the string is one character long:
Tes Te T
Then keep adding one letter of the second word until it's done:
Te Tes Test Testi Testin Testing
(if both strings are one character long, then just output one of them once.)
"Hello!", "Hi." Hello! Hello Hell Hel He H Hi Hi. "O", "O" O "z", "zz" z zz ".vimrc", ".minecraft" .vimrc .vimr .vim .vi .v . .m .mi .min .mine .minec .minecr .minecra .minecraf .minecraft " ", " " SSSSS SSSS SSS SS S SS SSS "0123456789", "02468" 0123456789 012345678 01234567 0123456 012345 01234 0123 012 01 0 02 024 0246 02468
(note: on the space/fourth test case, replace the S with spaces)
This is code-golf, so shortest answer in bytes wins! Tiebreaker is most upvoted post. Winner will be chosen on 09/10/2016.
Standard loopholes are forbidden.