squiggle/packages/website/docs/Api/List.md
2022-06-05 14:13:56 -07:00

1.5 KiB

sidebar_position title
4 List

toString

(list<'a>):string

length

(list<'a>):number

get

(list<a>, number):a

find

(list<a>, e => bool):a

filter

(list<a>, e => bool):a

set

(list<a>, number, a):a

shuffle

(list<a>):list<a>

reverse

(list<a>):list<a>

make

(number,a):list<a> (number, (index:number => a)):list<a> (pointSetDist):list<number>

range

(low:number, high:number) => list<number>

rangeBy

(low:number, high:number, increment: number) => list<number>

zip

(list<a>, list<b>):list<list<a|b>>

unzip

(list<list<a|b>>):list<list<a>, list<b>>

concat

(list<a>, list<b>): list<a|b>

concatMany

(list<list<a>>):list<a>

slice


map

(list<a>, (a -> b)): list<b>

reduce


reduceRight


includes

(list<'a>, 'a => bool):boolean

every

(list<'a>, 'a => bool):boolean

truncate

(list<'a>, number):list<'a>

uniq

(list<'a>):list

first

(list<'a>):'a

last

(list<'a>):'a

sort

(list<'a>):list