@antiraid-ext/collections
API reference for @antiraid-ext/collections
@antiraid-ext/collections
Functions
map
From https://github.com/luau-lang/lute/blob/primary/lute/std/libs/table.luau
Function Signature
-- From https://github.com/luau-lang/lute/blob/primary/lute/std/libs/table.luau
function map<K, A, B>(table: {
[K]: A
}, f: (A) -> B) -> {
[K]: B
} end
Generics
K
This generic is unconstrained and can be any type
A
This generic is unconstrained and can be any type
B
This generic is unconstrained and can be any type
Arguments
table
Prop | Type | Description |
---|---|---|
[K] | - |
f
Function Signature
f: (A) -> B
Arguments
arg1
Returns
ret1
Returns
ret1
{[K]: B}
filter
Function Signature
function filter<K, V>(table: {
[K]: V
}, predicate: (V) -> boolean) -> {
[K]: V
} end
Generics
K
This generic is unconstrained and can be any type
V
This generic is unconstrained and can be any type
Arguments
table
Prop | Type | Description |
---|---|---|
[K] | - |
predicate
Function Signature
predicate: (V) -> boolean
Arguments
arg1
Returns
ret1
Returns
ret1
{[K]: V}
fold
Function Signature
function fold<K, V, A>(table: {
[K]: V
}, f: (A, V) -> A, initial: A) -> A end
Generics
K
This generic is unconstrained and can be any type
V
This generic is unconstrained and can be any type
A
This generic is unconstrained and can be any type
Arguments
table
Prop | Type | Description |
---|---|---|
[K] | - |
f
Function Signature
f: (A, V) -> A
Arguments
arg1
arg2
Returns
ret1
initial
Returns
ret1
Last updated on