Home

Seq

Seq is an abbreviation for sequence and is used in several fields of computing and mathematics to denote an ordered list of terms or a tool that generates such lists. In computing, seq can refer to both a command-line utility and a programming construct designed to produce or manipulate sequences.

The seq command is part of GNU coreutils and related Unix utilities. It prints a sequence of

In functional programming, seq is a standard function in languages like Haskell. It forces its first argument

In R, seq() is a built-in function that creates regular sequences. It accepts arguments such as from,

numbers
from
a
starting
value
to
an
ending
value,
optionally
with
a
specified
step
size
and
formatting.
It
is
commonly
used
in
shell
scripting
to
generate
numeric
lists
for
iteration,
data
generation,
or
pagination.
Typical
usage
includes
producing
a
simple
range
such
as
a
sequence
from
one
to
five,
or
more
complex
sequences
with
a
defined
increment
and
custom
output
formatting.
to
be
evaluated
to
weak
head
normal
form
before
returning
the
second
argument,
enabling
explicit
control
over
evaluation
order
and
memory
usage.
Its
type
is
seq
::
a
->
b
->
b,
and
it
is
primarily
used
to
avoid
unintended
laziness
and
related
space
leaks.
to,
by,
and
length.out,
returning
a
numeric
vector.
It
is
widely
used
for
generating
index
sequences,
setting
plotting
ranges,
and
simulating
data.
Across
mathematics
and
computer
science,
seq
likewise
denotes
a
sequence—a
list
of
elements
indexed
in
order,
central
to
ideas
in
series,
convergence,
and
discrete
structures.