hkt-toolbelt
Advanced tools
Comparing version 0.15.1 to 0.16.1
@@ -1,5 +0,4 @@ | ||
import { $, Type, Kind } from ".."; | ||
import { RecursiveKind } from "./recursive-kind"; | ||
import { $, Type, Kind, Combinator } from ".."; | ||
export declare abstract class ApplySelf extends Kind.Kind { | ||
abstract f: (x: Type._$cast<this[Kind._], RecursiveKind>) => $<typeof x, Type._$cast<typeof x, Kind._$inputOf<typeof x>>>; | ||
abstract f: (x: Type._$cast<this[Kind._], Combinator.RecursiveKind>) => $<typeof x, Type._$cast<typeof x, Kind._$inputOf<typeof x>>>; | ||
} |
export * from "./apply-self"; | ||
export * from "./fix-sequence"; | ||
export * from "./recursive-kind"; | ||
export * from "./self"; |
@@ -31,3 +31,6 @@ import { Type, Kind, Digit, DigitList } from ".."; | ||
*/ | ||
ARROW_DOWN extends DigitList.DigitList = [...REMAINDER, ACTIVE], | ||
ARROW_DOWN extends DigitList.DigitList = DigitList._$trim<[ | ||
...REMAINDER, | ||
ACTIVE | ||
]>, | ||
/** | ||
@@ -34,0 +37,0 @@ * A sub-division step, computed via repeated subtraction. This results in the |
@@ -43,3 +43,3 @@ import { Type, Kind, Digit, DigitList } from ".."; | ||
*/ | ||
FINAL_RESULT = CARRY extends "1" ? [CARRY, ...OUTPUT] : OUTPUT, | ||
FINAL_RESULT extends DigitList.DigitList = CARRY extends "1" ? [CARRY, ...OUTPUT] : OUTPUT, | ||
/** | ||
@@ -49,5 +49,5 @@ * Is the carry bit is "0", we can skip the rest of the computation and return | ||
*/ | ||
SHORT_CIRCUIT = [...A, ...OUTPUT]> = A extends [] ? FINAL_RESULT : CARRY extends "0" ? SHORT_CIRCUIT : _$increment<NEXT_A, NEXT_CARRY, NEXT_OUTPUT>; | ||
SHORT_CIRCUIT extends DigitList.DigitList = [...A, ...OUTPUT]> = A extends [] ? FINAL_RESULT : CARRY extends "0" ? SHORT_CIRCUIT : _$increment<NEXT_A, NEXT_CARRY, NEXT_OUTPUT>; | ||
export declare abstract class Increment extends Kind.Kind { | ||
abstract f: (x: Type._$cast<this[Kind._], DigitList.DigitList>) => _$increment<typeof x>; | ||
} |
@@ -18,2 +18,4 @@ export { $, $$ } from "./$"; | ||
export * as List from "./list"; | ||
import * as NaturalNumberTheory from "./natural-number-theory"; | ||
export * as NaturalNumberTheory from "./natural-number-theory"; | ||
import * as NaturalNumber from "./natural-number"; | ||
@@ -42,2 +44,3 @@ export * as NaturalNumber from "./natural-number"; | ||
List: typeof List; | ||
NaturalNumberTheory: typeof NaturalNumberTheory; | ||
NaturalNumber: typeof NaturalNumber; | ||
@@ -44,0 +47,0 @@ Number: typeof Number; |
export * from "./add"; | ||
export * from "./decrement"; | ||
export * from "./divide-by"; | ||
export * from "./divide"; | ||
@@ -4,0 +5,0 @@ export * from "./increment"; |
{ | ||
"name": "hkt-toolbelt", | ||
"version": "0.15.1", | ||
"version": "0.16.1", | ||
"description": "Functional and composable type utilities", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
78287
165
2031