Public
Edited
Oct 11, 2024
Importers
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
permutations([1, 2, 3], [1, 2, 3])
Insert cell
Insert cell
Insert cell
permutations([0, 1], [0, 1], (a, b) => {
return !!(a && b);
})
Insert cell
Insert cell
Insert cell
permutations(
["Jane", "Mary", "Simone"],
[null, "von", "van der"],
["Leiden", "Schmitt"],

(firstName, prefix, lastName) => {
return firstName + " " + (prefix ? prefix + " " : "") + lastName;
}
)
Insert cell
Insert cell
Insert cell
permutations(
[1, 2, 3, 4],
[2, 4, 6],

(num, to) => {
return Math.pow(num, to);
},

(num, to, pow) => {
return pow / num;
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
permutationsTable(
[
"Arg 1",
"Arg 2",
"Arg 3",
"Sum",
"Subtraction",
"Product",
"And",
"Grouped or"
],

[0, 2, 4, 8, 16, 32],
[0, 3, 9, 27],
[0, -3, -9, -27],

(a, b, c) => {
return a + b + c;
},

(a, b, c) => {
return a - b - c;
},

(a, b, c) => {
return a * b * c;
},

(a, b, c) => {
return !!(a && b && c);
},

(a, b, c) => {
return !!((a && b) || (b && c));
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
binaryPermutations(
3, // Number of input columns

(a, b, c) => {
return !!(a && b && c);
},

(a, b, c) => {
return !!(a || b || c);
}
)
Insert cell
Insert cell
Insert cell
binaryPermutationsTable(
4,
["and", "or", "nand"],

(a, b, c, d) => {
return !!(a && b && c && d);
},

(a, b, c, d) => {
return !!(a || b || c || d);
},

(a, b, c, d, and, or) => {
return !!(or && !and);
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
allPermutations(1, 0, null)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
randomPermutation('and', 'or', 'nand', 'xor')
Insert cell
Insert cell
Insert cell
Insert cell
seededRandomPermutation(_seed, 'and', 'or', 'nand', 'xor')
Insert cell
Insert cell
Insert cell
Insert cell
keyedPermutations(['input_1', 'input_2', 'xor'], [0, 0, false], [0, 1, true], [1, 1, false])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more