-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
11,732 additions
and
592 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,184 @@ | ||
--- | ||
title: Bigint.ts | ||
nav_order: 1 | ||
parent: Modules | ||
--- | ||
|
||
## Bigint overview | ||
|
||
This module provides utility functions and type class instances for working with the `bigint` type in TypeScript. | ||
It includes functions for basic arithmetic operations, as well as type class instances for | ||
`Equivalence`, `Order`, `Semigroup`, and `Monoid`. | ||
|
||
Added in v1.0.0 | ||
|
||
--- | ||
|
||
<h2 class="text-delta">Table of contents</h2> | ||
|
||
- [guards](#guards) | ||
- [isBigint](#isbigint) | ||
- [instances](#instances) | ||
- [Equivalence](#equivalence) | ||
- [MonoidMultiply](#monoidmultiply) | ||
- [MonoidSum](#monoidsum) | ||
- [Order](#order) | ||
- [SemigroupMultiply](#semigroupmultiply) | ||
- [SemigroupSum](#semigroupsum) | ||
- [utils](#utils) | ||
- [decrement](#decrement) | ||
- [divide](#divide) | ||
- [increment](#increment) | ||
- [multiply](#multiply) | ||
- [subtract](#subtract) | ||
- [sum](#sum) | ||
|
||
--- | ||
|
||
# guards | ||
|
||
## isBigint | ||
|
||
**Signature** | ||
|
||
```ts | ||
export declare const isBigint: (u: unknown) => u is bigint | ||
``` | ||
Added in v1.0.0 | ||
# instances | ||
## Equivalence | ||
**Signature** | ||
```ts | ||
export declare const Equivalence: any | ||
``` | ||
Added in v1.0.0 | ||
## MonoidMultiply | ||
`bigint` monoid under multiplication. | ||
The `empty` value is `1n`. | ||
**Signature** | ||
```ts | ||
export declare const MonoidMultiply: any | ||
``` | ||
Added in v1.0.0 | ||
## MonoidSum | ||
`bigint` monoid under addition. | ||
The `empty` value is `0n`. | ||
**Signature** | ||
```ts | ||
export declare const MonoidSum: any | ||
``` | ||
Added in v1.0.0 | ||
## Order | ||
**Signature** | ||
```ts | ||
export declare const Order: any | ||
``` | ||
Added in v1.0.0 | ||
## SemigroupMultiply | ||
`bigint` semigroup under multiplication. | ||
**Signature** | ||
```ts | ||
export declare const SemigroupMultiply: any | ||
``` | ||
Added in v1.0.0 | ||
## SemigroupSum | ||
`bigint` semigroup under addition. | ||
**Signature** | ||
```ts | ||
export declare const SemigroupSum: any | ||
``` | ||
Added in v1.0.0 | ||
# utils | ||
## decrement | ||
**Signature** | ||
```ts | ||
export declare const decrement: (n: bigint) => bigint | ||
``` | ||
Added in v1.0.0 | ||
## divide | ||
**Signature** | ||
```ts | ||
export declare const divide: (that: bigint) => (self: bigint) => bigint | ||
``` | ||
Added in v1.0.0 | ||
## increment | ||
**Signature** | ||
```ts | ||
export declare const increment: (n: bigint) => bigint | ||
``` | ||
Added in v1.0.0 | ||
## multiply | ||
**Signature** | ||
```ts | ||
export declare const multiply: (that: bigint) => (self: bigint) => bigint | ||
``` | ||
Added in v1.0.0 | ||
## subtract | ||
**Signature** | ||
```ts | ||
export declare const subtract: (that: bigint) => (self: bigint) => bigint | ||
``` | ||
Added in v1.0.0 | ||
## sum | ||
**Signature** | ||
```ts | ||
export declare const sum: (that: bigint) => (self: bigint) => bigint | ||
``` | ||
Added in v1.0.0 |
Oops, something went wrong.