-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fjl - Parameterized some functions, and removed some curlys.
- Loading branch information
Showing
15 changed files
with
25 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Auxiliary Todos | ||
|
||
- [ ] Switch to node/deno built-in testing tools (better "managed" dependency alternative). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* Equality combinator. | ||
*/ | ||
export const equal = (a: any, b: any) => a === b, | ||
export const equal = <T = any>(a: T, b: T) => a === b, | ||
|
||
/** | ||
* Curried version of `equal` | ||
*/ | ||
$equal = (a: any) => (b: any) => a === b; | ||
$equal = <T>(a: T) => (b: T) => a === b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import {UnitNary} from "../types"; | ||
import {Nary, UnitNary} from "../types"; | ||
|
||
/** | ||
* Functional `bind` - ignores first `#Function.bind()` argument. | ||
*/ | ||
export const bind = <F extends UnitNary>(fn: F, ...args: any[]): ReturnType<F> => | ||
export const bind = <F extends UnitNary>(fn: F, ...args: any[]): Nary<any, ReturnType<F>> => | ||
fn.bind(null, ...args), | ||
|
||
/** | ||
* Curried version of `bind`. | ||
*/ | ||
$bind = <F extends UnitNary>(fn: F) => (...args: any[]): ReturnType<F> => | ||
$bind = <F extends UnitNary>(fn: F) => (...args: any[]): Nary<any, ReturnType<F>> => | ||
fn.bind(null, ...args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import {sliceFrom} from "./sliceFrom"; | ||
|
||
export const | ||
|
||
/** | ||
* Returns a copy of a slice (E.g., an array and/or a string). | ||
*/ | ||
sliceCopy = (xs: string | any[]): typeof xs => | ||
sliceFrom(0, xs) | ||
sliceCopy = (xs: string | any[]): typeof xs => xs.slice(0) | ||
|
||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters