Message Boards Message Boards


How can I apply a function to all elements of a deep list?

Posted 8 years ago
1 Reply
0 Total Likes

Hello everyone,

Say I have a list of lists, whose depth is 5.

myLists = {{12.3, x, y, {w, z, "two"}},
  {67.4, {90.8, "this and that", {h, j, 56}}}}

You can see that some elements of the sublists are numbers, some are symbols, and some are strings. How can I convert all of the individual elements to strings by applying the ToString function?


POSTED BY: Gregory Lypny

Try having a look at the functions Map and MapAll!

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract