SlotSequence

##

represents the sequence of arguments supplied to a pure function.

##n

represents the sequence of arguments supplied to a pure function, starting with the n ^(th) argument.

Details

  • ## is used to represent sequences of arguments in pure functions of the form body& or Function[body].
  • ## is equivalent to SlotSequence[] or SlotSequence[1]. »
  • ##n is equivalent to SlotSequence[n]. n must be a positive integer. »
  • A sequence of arguments supplied to a pure function is "spliced" into the body of the function wherever ## and so on appear.

Examples

open allclose all

Basic Examples  (2)

## represents the complete sequence of arguments supplied to the pure function:

Start with the second argument:

Scope  (2)

## is short for ##1, all arguments of the function:

##2 stands for all arguments starting with the second:

Applications  (2)

Programmatically insert a list of iterators into a Table:

Numerically integrate over 1000 variables:

Properties & Relations  (2)

The raw object corresponding to ## is a Sequence:

#n stands for a single argument:

Possible Issues  (1)

If too few arguments are provided, a message is generated:

Wolfram Research (1988), SlotSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/SlotSequence.html.

Text

Wolfram Research (1988), SlotSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/SlotSequence.html.

CMS

Wolfram Language. 1988. "SlotSequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SlotSequence.html.

APA

Wolfram Language. (1988). SlotSequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SlotSequence.html

BibTeX

@misc{reference.wolfram_2024_slotsequence, author="Wolfram Research", title="{SlotSequence}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/SlotSequence.html}", note=[Accessed: 18-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_slotsequence, organization={Wolfram Research}, title={SlotSequence}, year={1988}, url={https://reference.wolfram.com/language/ref/SlotSequence.html}, note=[Accessed: 18-December-2024 ]}