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.

2
  • 4
    $\begingroup$ ...or use the "vanishing function" variation: Table[If[PrimeQ[k], k^2, ## &[]], {k, 20}] $\endgroup$ Commented Nov 13, 2012 at 22:18
  • 1
    $\begingroup$ @J.M. the vanishing function is very useful in specific circumstances but I personally find it less transparent than the alternatives. Also, it comes with a certain amount of overhead--here, for example, it's almost 50% slower than using Unevaluated@Sequence[]. $\endgroup$ Commented Nov 14, 2012 at 14:15