2
$\begingroup$

This isn't documented, and the front end highlights the second comma and third argument in red, but it's used in DownValues[Once][[3]] and is very convenient. Anyone know more?

$\endgroup$
4
  • 6
    $\begingroup$ Does this answer your question? How to avoid nested With[]? -- See this answer in particular. $\endgroup$
    – Michael E2
    Apr 22, 2023 at 10:28
  • $\begingroup$ Getting proper syntax coloring is apparently not a trivial undertaking. Until that happens I doubt it will be documented. But the change that allowed this syntax is intended to be permanent. $\endgroup$ Apr 22, 2023 at 15:07
  • $\begingroup$ I think two comments, by István Zachar and Daniel Lichtblau are worth cross-referencing, as is IterateWith. "Normally, later With variables are unaware of earlier variables’ values". Compare With[{a = 3, b = a + 2, c = a + b}, {a, b, c}] to With[{a = 3}, {b = a + 2}, {c = a + b}, {a, b, c}] ... $\endgroup$
    – user1066
    Apr 22, 2023 at 18:35
  • $\begingroup$ .... But why is this not better documented? A similar comment could be applied to obtaining a stable sort $\endgroup$
    – user1066
    Apr 22, 2023 at 18:36

0

Browse other questions tagged or ask your own question.