Skip to main content

xorFn()

xorFn<T>(a): (b) => (c) => boolean

Logical Exclusive (Function Result) Disjunction (a(x) ^ b(x)).

Type Parameters

T

The type of the input value of the functions.

Parameters

a

(x) => unknown

The first function to bitwise XOR the return of.

Returns

Function

Parameters

b

(x) => unknown

Returns

Function

Parameters

c

T

Returns

boolean

See

https://en.wikipedia.org/wiki/Exclusive_or

Remarks

pure function

Example

xorFn(s => s.trim())(s => s.trimEnd())('foo bar ');
// false