Skip to main content
argh, another missing word (proof-reading skills need work)
Source Link
WReach
  • 69.3k
  • 4
  • 165
  • 272

Oops, we need spaces between the strings.

Oops, we spaces between the strings.

Oops, we need spaces between the strings.

some missing words were bugging me enough to overcome my resistance to bumping this post back onto the active list
Source Link
WReach
  • 69.3k
  • 4
  • 165
  • 272

That last one looks promising. Take no notice of the fact that I pulled that regex out of a hat -- this post is long enough! What we need to do is to scan for brackets and drop down a level when we see an opening one and pop back up when we see a closing one:

We need to join the strings together:

This function prints out its arguments, returning the last unchanged. It can be quickly inserted at various places in a pipeline to see what they return. For example:

That last one looks promising. Take no notice of the fact that I pulled that regex out of a hat -- this post is long enough! What we need to do is to scan for brackets and drop down level when we see an opening one and pop back up when we see a closing one:

We need to join strings together:

This function prints out its arguments, returning the last unchanged. It can quickly inserted at various places in a pipeline to see what they return. For example:

That last one looks promising. Take no notice of the fact that I pulled that regex out of a hat -- this post is long enough! What we need to do is to scan for brackets and drop down a level when we see an opening one and pop back up when we see a closing one:

We need to join the strings together:

This function prints out its arguments, returning the last unchanged. It can be quickly inserted at various places in a pipeline to see what they return. For example:

added a link to Leonid's book
Source Link
WReach
  • 69.3k
  • 4
  • 165
  • 272

You can get a feel for iteration in Mathematica from the Functional Operations tutorial in the documentation, but you'd be hard-pressed to find a better investment of your time than to read Mathematica Programming - an advanced introduction.

You can get a feel for iteration in Mathematica from the Functional Operations tutorial in the documentation.

As you can see from the many responses to this question. There, there are many ways to approach this problem. I dare say that they hardly scratch the surface of possible solutions. I will add another, but make no claim as to how it stacks up against other answers. This response is more concerned with the process of creating the solution.

You can get a feel for iteration in Mathematica from the Functional Operations tutorial in the documentation.

As you can see from the many responses to this question. There are many ways to approach this problem. I dare say that they hardly scratch the surface of possible solutions. I will add another, but make no claim as to how it stacks up against other answers. This response is more concerned with the process of creating the solution.

You can get a feel for iteration in Mathematica from the Functional Operations tutorial in the documentation, but you'd be hard-pressed to find a better investment of your time than to read Mathematica Programming - an advanced introduction.

As you can see from the many responses to this question, there are many ways to approach this problem. I dare say that they hardly scratch the surface of possible solutions. I will add another, but make no claim as to how it stacks up against other answers. This response is more concerned with the process of creating the solution.

Source Link
WReach
  • 69.3k
  • 4
  • 165
  • 272
Loading