1
$\begingroup$

Consider

Join[Range[3], {Range[3]}]

{1, 2, 3, {1, 2, 3}}

and

StringJoin["abc", {"abc"}]

"abcabc"

Both expressions contain a list and a nested list, but the results are different. Why?

$\endgroup$

closed as off-topic by Kuba, m_goldberg, Young, Jason B., István Zachar Aug 12 '16 at 15:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Kuba, m_goldberg, Young, Jason B., István Zachar
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ Because those are different functions. "All lists are ignored:" - second example in StringJoin. $\endgroup$ – Kuba Aug 12 '16 at 12:02
  • 1
    $\begingroup$ You ask "Why?" Because Wolfram Research, Inc., did it that way. If you have a beef about it, take it up with WRI. $\endgroup$ – m_goldberg Aug 12 '16 at 13:03
  • $\begingroup$ the alternative would be to throw an error, i suppose that's good enough reason. $\endgroup$ – george2079 Aug 12 '16 at 18:46