From 0ff9052a8163a1e485a4ce93760e70150bbca041 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Thu, 7 Jan 2021 21:35:48 +0100 Subject: [PATCH] Add the 'not' operator to Fun primitives --- src/UnitJS/Fun.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/UnitJS/Fun.js b/src/UnitJS/Fun.js index a0868ae..de78c8e 100644 --- a/src/UnitJS/Fun.js +++ b/src/UnitJS/Fun.js @@ -3,6 +3,7 @@ return { compose: compose, defined: defined, id: id, + not: not, insert: insert, map: map, mapFilter: mapFilter, @@ -32,6 +33,10 @@ function id(x) { return x; } +function not(x) { + return !x; +} + function insert(obj, t, comparer, min, max) { min = defined(min) ? min : 0; max = defined(max) ? max : t.length;