I created a variable that represents a sequence:
mySeq = Sequence[1, 2, 3];
I wanted to use that variable as an argument for some functions. But I got in trouble. For example,
FreeQ[mySeq, 1]
generates an error message.
So I wanted to test if mySeq was a sequence before I used it as an argument. But there is no predicate SequenceQ and
Head[mySeq]
also generates an error message.
Is there a way to test whether mySeq is a sequence object?
mySeqas aListand useApply? For instance, ifmySeq = {1,2,3}, thenf @@ mySeqevaluates tof[1, 2, 3]. (@@is the infix form ofApply.) – march Sep 12 '16 at 18:31