WLJS LogoWLJS Notebook

Thread

Thread[f[args]] threads f over any lists that appear in args.

Examples

Thread over lists:

Thread[f[{a, b, c}, {1, 2, 3}]]
(* {f[a, 1], f[b, 2], f[c, 3]} *)

Create rules:

Thread[{a, b, c} -> {1, 2, 3}]
(* {a -> 1, b -> 2, c -> 3} *)

Please visit the official Wolfram Language Reference for more details.

On this page