Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • $\begingroup$ I think the OP is trying to write a "macro" that expand at the first element of With. It's rather hard for me . $\endgroup$ Commented Jul 15, 2013 at 15:04
  • 2
    $\begingroup$ @mm.Jang checked it and it works with 9... $\endgroup$ Commented Jul 15, 2013 at 15:36
  • 1
    $\begingroup$ @Stefan I don't really know what happened, can't reproduce this anymore. I believe I copied the code in a right way. $\endgroup$ Commented Jul 15, 2013 at 15:37
  • 1
    $\begingroup$ @mm.Jang i know exactly what you mean...fiddling around with replacements it is sometimes best to start with a fresh kernel...or do the replacements inside a With. $\endgroup$ Commented Jul 15, 2013 at 15:53
  • 1
    $\begingroup$ Or, perhaps a bit simpler, With[{list = Thread[params -> vals]},(*fancy operation*){a, b, c, d} /. list] $\endgroup$ Commented Jul 15, 2013 at 23:33