Handbook
Glossary
n+v ( n v -- w )
Factor handbook
»
The language
»
Numbers
»
Vector operations
»
Vector arithmetic
Prev:
v+n ( v n -- w )
Next:
v-n ( v n -- w )
Vocabulary
math
.
vectors
Inputs
n
a
number
v
a
sequence
of
number
s
Outputs
w
a
sequence
of
number
s
Word description
Adds
n
to each element of
v
.
Definition
IN:
math.vectors
GENERIC:
n+v
( n v -- w )
Methods
USING:
kernel
math.vectors
sequences.cords
;
M:
cord
n+v
[
n+v
]
with
cord-map
;
inline
USING:
kernel
math
math.vectors
sequences
;
M:
object
n+v
[
+
]
with
map
;
inline
USING:
kernel
math.vectors
ranges
;
M:
range
n+v
swap
v+n
;
USING:
kernel
math.vectors
math.vectors.simd
;
M:
simd-128
n+v
[
simd-with
]
keep
v+
;
inline