re-work thunks

This commit is contained in:
Jon Staab
2025-04-14 11:51:09 -07:00
parent b6b54f650b
commit e54cb0a62d
3 changed files with 282 additions and 222 deletions
+8 -2
View File
@@ -1283,13 +1283,13 @@ export const spec =
/** Returns a function that checks equality with value */
export const eq =
<T>(v: T) =>
(x: T) =>
(x: T, ...args: unknown[]) =>
x === v
/** Returns a function that checks inequality with value */
export const ne =
<T>(v: T) =>
(x: T) =>
(x: T, ...args: unknown[]) =>
x !== v
/** Returns a function that gets property value from object */
@@ -1310,6 +1310,12 @@ export const dissoc =
(o: T) =>
omit([k], o)
/** Returns a function that checks whether a value is in the given sequence */
export const member =
<T>(xs: Iterable<T>) =>
(x: T) =>
Array.from(xs).includes(x)
// ----------------------------------------------------------------------------
// Sets
// ----------------------------------------------------------------------------