LogoAntiRaid

@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

PropTypeDescription
[K]
-

f

Function Signature
f: (A) -> B

Arguments

arg1

A

Returns

ret1

B

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

PropTypeDescription
[K]
-

predicate

Function Signature
predicate: (V) -> boolean

Arguments

arg1

V

Returns

ret1

boolean

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

PropTypeDescription
[K]
-

f

Function Signature
f: (A, V) -> A

Arguments

arg1

A

arg2

V

Returns

ret1

A

initial

A

Returns

ret1

A

Last updated on