motoko-base icon indicating copy to clipboard operation
motoko-base copied to clipboard

The Motoko base library

Results 108 motoko-base issues
Sort by recently updated
recently updated
newest added

Like [Haskell's `group`](https://hoogle.haskell.org/?q=group). Her is one implementation for arrays, that I came up with: ``` Motoko type Comp = { #less; #equal; #greater }; func group(arr : [A], ca :...

enhancement
good first issue

https://github.com/dfinity/motoko-base/blob/80ededb39954739b18b88fc0e5561264003cf9ab/src/Array.mo#L539 `let element = subArray[inner];` subArray may be an array of length 0.

``` Motoko let ivs : [[Nat32]] = [ ``` should be a one-dimensional array for only the first 8 values. This also implies simplifying the `func reset()`. Furthermore the `iv`...

_Some base library features are undocumented e.g. Array - functions after subArray() are undocumented e.g. None - not yet documentated_ See: https://forum.dfinity.org/t/edits-in-motoko-base-library-docs/23433

The two functions, returning an Iter, would be useful.

The current `Heap.fromIter/heapify` gets stack overflow when there are more than 100k elements: https://github.com/dfinity/canister-profiling/pull/70. We need to either 1) rewrite the `join` function with an accumulator; or 2) enable tail...

Adds a generated `lib.mo` file to enable the following import style: `import { Nat; Array } "mo:base";` TODO: - [ ] Add unit test(s) - [ ] Validate `lib.mo` via...

> Takes an iterator and returns a new iterator that produces the same elements with corresponding indices. ```motoko import Iter "mo:base/Iter"; let letters = [ "a", "b", "c" ]; let...

cla:agreed

I need `Deque.size()` function to determine the length of the queue. It is missing.

https://internetcomputer.org/docs/current/motoko/main/base/Random: > all bets must be closed _before_ entropy is being asked for in order to decide them The term "bets" is introduced without first explaining what it means.