3 Removed things that are interesting and fun but not really relevant.
source | link

R.M's answer below is faster and waaayway shorter than this one

The motivation for both these answersmain idea of this answer is to avoid testing if elements of the list are strings, but rather to infer which elements are the strings, to get a speed increase.

Lazy answer Here is the function

Block[
 {bool1joinStringsInList[list_] := StringQ[First[test]],
  bool2 = StringQ[Last[test]],Module[
  testSplit{splitList = SplitBy[testSplitBy[list, StringQ],
  strs, others, len, res
  bool}
 ,
  len = Length[testSplit];
 If[bool1 && bool2
  ,
  strsbool = StringJoin /@ testSplit[[1StringQ[First[test]];
 ;; len ;;= 2]];Length[splitList];

  {strs, others} = testSplit[[2 ;; len ;; 2]];
  res = Riffle[strs, others]If[
  ];
 Flatten[res]
 ]

Note that this only works for the case where the first and last elements are strings. I was too lazy to do the rest :).

Not so lazy answer

The following function is generated by metaprogramming. I feel we should not care the formatting of it, as it is in this sense not source code. If you want to see a nicely formatted function, look further down :). The resulting function is this

joinStringsInList[list$_] := 
 Module[{splitList = SplitBy[list$, StringQ], strs, others, len}, 
  bool$8911 = StringQ[First[test]]; len = Length[splitList]; 
  ReleaseHold[bool,
   Hold[If[bool$8911, strs = {StringJoin /@ splitList[[1 ;; len ;; 2]];2]],
      others = splitList[[2 ;; len ;; 2]]}, 
     strs = {StringJoin /@ splitList[[2 ;; len ;; 2]]; 2]],
     others = splitList[[1 ;; len ;; 2]]]]];2]]}
    ];
  Flatten[Riffle[strs, others], 1]]1]
  ]

The idea here is exactly the same as in code further above, but complete. It turned out I only needed one of the booleans.

There are two things a bit ugly in the code above (besides the formatting). One is the fact that there is a ReleaseHold and a Hold which cancel each other out. The other is that bool is not a variable in the Module, so that there can be a conflict in variables. However, the code above was generated by some metaprogramming, so for now I will leave it at that.

The metaprogramming

If you wish to see the metaprogramming, which also contains an explanation of the code, take a look at this.

compressed = "1:eJztWn2MVFcVXz7KVwtYWoNWWi4LKQsdh7JQ0wCbsruwsBYKZVYapC3cnbkz88qbdyfv\
3rfDtmCwaEu0JBoT40drW6PEamJiv9JoYhN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6vTN59r5bMdnomWramEiuMLgrILrdH\
VWb4MSXQlYVIJc3eHlHBs4IeT6/GxO5lM3pVkQBKSOPyNn/\
ldm7MUaYGfSwuluDsOjOJosV+kPS1MGF/OiGpMf50wvFWVil4pRX/qWS84/\
9DV9hA0bjOZpWtls7ao1UoQE+TGuIv4zdwSBdQL9wXFWAK3yNKYNZv0BX+\
lQBFERjoCP5ABTrJ+IFIy6SYha+qm1Z3dHuHSh2z89aIzAXE4ASSWlh1HfYPv+\
41qtBlTVp3gDx0GT1GZhtUJn3vip6+fU0T4vIzQolf7g5e4S+me0K6FL6Xn/\
fDKl5fipfRtJxeeXBq65CY8v2LmK4QfWvjW2Rh8feFPfyP8yKnPvB2DH7iu59+Ev/\
3pT12IwU/pZR8QvvEX930Qg9/9zpopPYhnvvjNT/ZE8ZfOvHIt4QtGzl0bg59+\
kHcTvmbuu8ti8OvXXZUk/OixgWQMfmT3m6sIz3/t/E0x+JOfO9NH+K/m5m+Jwbt/\
d3qQ8GseWLwhBj/70oVNhP/5C0+OxODO7qd2Ef6ta7r3xuDHD5x2CD/x3D3FGDx3cqpH+\
Pk3PnGYGv94Zu+RmI7HsnseJfz1f8nHqPHiz7//TEzHV59+4/\
AyxE8tOPSlZVH80OCbzxP+0PALx2PwaT954gThf//lzt/G4CcGLvye8Gf1NdOXx+\
z4iSlX0M8oDpx5dU4M/v7h3R8n/JGvvz8/Bn/uZ28tIPyn9z/\
RE4PftmnRBcKv3vfidTdE8dXvfK8bP7ub7/7q6hj8x8eP3kz48Xf/uSUG7/v14yOE/+\
Who7ti8Bt+MLCX8HV3vmca/zn3lVxMx5HVzx8m/PM3njwag59/YOYxwu/PzX82Br/\
91pdPEv7H0795NQafvzN9lvDvPuKejcEXHOx6j/AzD62YlIjii9c9PAs/u8v/\
++isGPzL91rzCT/V9aOFMXjmjTmrCF9y8y5q/A/MMSmU"

and if you trust me, do

Uncompress[compressed, Hold] // ReleaseHold // ReleaseHold

Where I added the second argument of Uncompress to give you the possibility to inspect the code before executing it.

P.S.: Sorry for pushing the other answers down.

R.M's answer below is faster and waaay shorter than this one

The motivation for both these answers is to avoid testing if elements of the list are strings, to get a speed increase.

Lazy answer

Block[
 {bool1 = StringQ[First[test]],
  bool2 = StringQ[Last[test]],
  testSplit = SplitBy[test, StringQ],
  strs, others, len, res
  }
 ,
  len = Length[testSplit];
 If[bool1 && bool2
  ,
  strs = StringJoin /@ testSplit[[1 ;; len ;; 2]];

  others = testSplit[[2 ;; len ;; 2]];
  res = Riffle[strs, others]
  ];
 Flatten[res]
 ]

Note that this only works for the case where the first and last elements are strings. I was too lazy to do the rest :).

Not so lazy answer

The following function is generated by metaprogramming. I feel we should not care the formatting of it, as it is in this sense not source code. If you want to see a nicely formatted function, look further down :). The resulting function is this

joinStringsInList[list$_] := 
 Module[{splitList = SplitBy[list$, StringQ], strs, others, len}, 
  bool$8911 = StringQ[First[test]]; len = Length[splitList]; 
  ReleaseHold[
   Hold[If[bool$8911, strs = StringJoin /@ splitList[[1 ;; len ;; 2]];
      others = splitList[[2 ;; len ;; 2]], 
     strs = StringJoin /@ splitList[[2 ;; len ;; 2]]; 
     others = splitList[[1 ;; len ;; 2]]]]]; 
  Flatten[Riffle[strs, others], 1]]

The idea here is exactly the same as in code further above, but complete. It turned out I only needed one of the booleans.

There are two things a bit ugly in the code above (besides the formatting). One is the fact that there is a ReleaseHold and a Hold which cancel each other out. The other is that bool is not a variable in the Module, so that there can be a conflict in variables. However, the code above was generated by some metaprogramming, so for now I will leave it at that.

The metaprogramming

If you wish to see the metaprogramming, which also contains an explanation of the code, take a look at this.

compressed = "1:eJztWn2MVFcVXz7KVwtYWoNWWi4LKQsdh7JQ0wCbsruwsBYKZVYapC3cnbkz88qbdyfv\
3rfDtmCwaEu0JBoT40drW6PEamJiv9JoYhNMMI1NNSlRMC02kUTth6GKtbSpes6582bem/\
fmk23jH5Ds4773u/fcc88993zdWTQqd2QndXV1qanw2CztjHmbCY9BYdvbXcvR2Sl+B/\
xkOkyH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PS1MGF/OiGpMf50wvFWVil4pRX/qWS84/\
9DV9hA0bjOZpWtls7ao1UoQE+TGuIv4zdwSBdQL9wXFWAK3yNKYNZv0BX+\
lQBFERjoCP5ABTrJ+IFIy6SYha+qm1Z3dHuHSh2z89aIzAXE4ASSWlh1HfYPv+\
41qtBlTVp3gDx0GT1GZhtUJn3vip6+fU0T4vIzQolf7g5e4S+me0K6FL6Xn/\
fDKl5fipfRtJxeeXBq65CY8v2LmK4QfWvjW2Rh8feFPfyP8yKnPvB2DH7iu59+Ev/\
3pT12IwU/pZR8QvvEX930Qg9/9zpopPYhnvvjNT/ZE8ZfOvHIt4QtGzl0bg59+\
kHcTvmbuu8ti8OvXXZUk/OixgWQMfmT3m6sIz3/t/E0x+JOfO9NH+K/m5m+Jwbt/\
d3qQ8GseWLwhBj/70oVNhP/5C0+OxODO7qd2Ef6ta7r3xuDHD5x2CD/x3D3FGDx3cqpH+\
Pk3PnGYGv94Zu+RmI7HsnseJfz1f8nHqPHiz7//TEzHV59+4/\
AyxE8tOPSlZVH80OCbzxP+0PALx2PwaT954gThf//lzt/G4CcGLvye8Gf1NdOXx+\
z4iSlX0M8oDpx5dU4M/v7h3R8n/JGvvz8/Bn/uZ28tIPyn9z/\
RE4PftmnRBcKv3vfidTdE8dXvfK8bP7ub7/7q6hj8x8eP3kz48Xf/uSUG7/v14yOE/+\
Who7ti8Bt+MLCX8HV3vmca/zn3lVxMx5HVzx8m/PM3njwag59/YOYxwu/PzX82Br/\
91pdPEv7H0795NQafvzN9lvDvPuKejcEXHOx6j/AzD62YlIjii9c9PAs/u8v/\
++isGPzL91rzCT/V9aOFMXjmjTmrCF9y8y5q/A/MMSmU"

and if you trust me, do

Uncompress[compressed, Hold] // ReleaseHold // ReleaseHold

Where I added the second argument of Uncompress to give you the possibility to inspect the code before executing it.

P.S.: Sorry for pushing the other answers down.

R.M's answer below is faster and way shorter than this one

The main idea of this answer is to avoid testing if elements of the list are strings, but rather to infer which elements are the strings, to get a speed increase. Here is the function

joinStringsInList[list_] :=
 Module[
  {splitList = SplitBy[list, StringQ], strs, others, len, bool}, 
  bool = StringQ[First[test]];
  len = Length[splitList];

  {strs, others} =
   If[
    bool,
    {StringJoin /@ splitList[[1 ;; len ;; 2]],
     splitList[[2 ;; len ;; 2]]},
    {StringJoin /@ splitList[[2 ;; len ;; 2]],
     splitList[[1 ;; len ;; 2]]}
    ];
  Flatten[Riffle[strs, others], 1]
  ]
2 Added some funky metaprogramming and a complete version.
source | link

I seemR.M's answer below is faster and waaay shorter than this one

The motivation for both these answers is to have misunderstood the OPs dissatisfaction with his own answer. I felt the additionalavoid testing that some lists are listsif elements of strings a bit ugly. We really should already know where the lists of stringslist are. However strings, my answer is all the longerto get a speed increase.

Lazy answer

Note that this only works for the case where the first and last elements are strings. I was too lazy to do the rest :).

Not so lazy answer

The following function is generated by metaprogramming. I feel we should not care the formatting of it, as it is in this sense not source code. If you want to see a nicely formatted function, look further down :). The resulting function is this

joinStringsInList[list$_] := 
 Module[{splitList = SplitBy[list$, StringQ], strs, others, len}, 
  bool$8911 = StringQ[First[test]]; len = Length[splitList]; 
  ReleaseHold[
   Hold[If[bool$8911, strs = StringJoin /@ splitList[[1 ;; len ;; 2]];
      others = splitList[[2 ;; len ;; 2]], 
     strs = StringJoin /@ splitList[[2 ;; len ;; 2]]; 
     others = splitList[[1 ;; len ;; 2]]]]]; 
  Flatten[Riffle[strs, others], 1]]

The idea here is exactly the same as in code further above, but complete. It turned out I only needed one of the booleans.

Example:

test = {"a", "a", {1, 1}, bool, testSplit, 2, "A", "b", 123, "a", 
  "end"}

joinStringsInList[test]

{"aa", {1, 1}, bool, testSplit, 2, "Ab", 123, "aend"}

There are two things a bit ugly in the code above (besides the formatting). One is the fact that there is a ReleaseHold and a Hold which cancel each other out. The other is that bool is not a variable in the Module, so that there can be a conflict in variables. However, the code above was generated by some metaprogramming, so for now I will leave it at that.

The metaprogramming

If you wish to see the metaprogramming, which also contains an explanation of the code, take a look at this.

compressed = "1:e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L91rzCT/V9aOFMXjmjTmrCF9y8y5q/A/MMSmU"

and if you trust me, do

Uncompress[compressed, Hold] // ReleaseHold // ReleaseHold

Where I added the second argument of Uncompress to give you the possibility to inspect the code before executing it.

P.S.: Sorry for pushing the other answers down.

I seem to have misunderstood the OPs dissatisfaction with his own answer. I felt the additional testing that some lists are lists of strings a bit ugly. We really should already know where the lists of strings are. However, my answer is all the longer

Note that this only works for the case where the first and last elements are strings. I was too lazy to do the rest :).

R.M's answer below is faster and waaay shorter than this one

The motivation for both these answers is to avoid testing if elements of the list are strings, to get a speed increase.

Lazy answer

Note that this only works for the case where the first and last elements are strings. I was too lazy to do the rest :).

Not so lazy answer

The following function is generated by metaprogramming. I feel we should not care the formatting of it, as it is in this sense not source code. If you want to see a nicely formatted function, look further down :). The resulting function is this

joinStringsInList[list$_] := 
 Module[{splitList = SplitBy[list$, StringQ], strs, others, len}, 
  bool$8911 = StringQ[First[test]]; len = Length[splitList]; 
  ReleaseHold[
   Hold[If[bool$8911, strs = StringJoin /@ splitList[[1 ;; len ;; 2]];
      others = splitList[[2 ;; len ;; 2]], 
     strs = StringJoin /@ splitList[[2 ;; len ;; 2]]; 
     others = splitList[[1 ;; len ;; 2]]]]]; 
  Flatten[Riffle[strs, others], 1]]

The idea here is exactly the same as in code further above, but complete. It turned out I only needed one of the booleans.

Example:

test = {"a", "a", {1, 1}, bool, testSplit, 2, "A", "b", 123, "a", 
  "end"}

joinStringsInList[test]

{"aa", {1, 1}, bool, testSplit, 2, "Ab", 123, "aend"}

There are two things a bit ugly in the code above (besides the formatting). One is the fact that there is a ReleaseHold and a Hold which cancel each other out. The other is that bool is not a variable in the Module, so that there can be a conflict in variables. However, the code above was generated by some metaprogramming, so for now I will leave it at that.

The metaprogramming

If you wish to see the metaprogramming, which also contains an explanation of the code, take a look at this.

compressed = "1:eJztWn2MVFcVXz7KVwtYWoNWWi4LKQsdh7JQ0wCbsruwsBYKZVYapC3cnbkz88qbdyfv\
3rfDtmCwaEu0JBo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added the second argument of Uncompress to give you the possibility to inspect the code before executing it.

P.S.: Sorry for pushing the other answers down.

1
source | link

I seem to have misunderstood the OPs dissatisfaction with his own answer. I felt the additional testing that some lists are lists of strings a bit ugly. We really should already know where the lists of strings are. However, my answer is all the longer

Block[
 {bool1 = StringQ[First[test]],
  bool2 = StringQ[Last[test]],
  testSplit = SplitBy[test, StringQ],
  strs, others, len, res
  }
 ,
 len = Length[testSplit];
 If[bool1 && bool2
  ,
  strs = StringJoin /@ testSplit[[1 ;; len ;; 2]];

  others = testSplit[[2 ;; len ;; 2]];
  res = Riffle[strs, others]
  ];
 Flatten[res]
 ]

Note that this only works for the case where the first and last elements are strings. I was too lazy to do the rest :).