Appearance
创建一个结果取反的函数。
import { negate } from '@base-web-kits/base-tools-ts'; function isEven(n) { return n % 2 == 0; } const isOdd = negate(isEven); isOdd(1); // 结果: true
predicate (Function)
(Function)