Message Boards Message Boards

0
|
7600 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

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

Posted 9 years ago

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?

Gregory

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
Attachments
Remove
or Discard

Group Abstract Group Abstract