trl
list transforms. Pure ilusm prelude.
Load with: use trl
Quick example
use trl
result = trlma([1, 2, 3], \(x) x)
prn(result)
Functions
Functions
trlma(xs, f)
Performs the operation. Takes xs, f.
trlfi(xs, f)
Performs the operation. Takes xs, f.
trlal(xs, f)
Performs the operation. Takes xs, f.
trlan(xs, f)
Performs the operation. Takes xs, f.
trlse(xs, f)
Sets a value. Takes xs, f.
trlid(xs, f)
Performs the operation. Takes xs, f.
trltl(xs, f)
Performs the operation. Takes xs, f.
trlea(xs, f)
Performs the operation. Takes xs, f.
trlfl(xs, f)
Performs the operation. Takes xs, f.
trlgr(xs, f)
Performs the operation. Takes xs, f.
trlfl(xs, z0, f)
Performs the operation. Takes xs, z0, f.
trlre(xs)
Performs the operation. Takes xs.
trlun(xs)
Performs the operation. Takes xs.
trlzi(a, b)
Performs the operation. Takes a, b.
trlsr(xs)
Performs the operation. Takes xs.
trlca(a, b)
Performs the operation. Takes a, b.
trlpa(xs, pred)
Parses. Takes xs, pred.
trlta(xs, n)
Performs the operation. Takes xs, n.
trldr(lst, n)
Performs the operation. Takes lst, n.
trlzi(a, b, f)
Performs the operation. Takes a, b, f.
trlsl(xs, a, b)
Performs the operation. Takes xs, a, b.
trlrn(n)
Performs the operation. Takes n.
trlmo(xs)
Performs the operation. Takes xs.
trlrn_ab(a, b)
Performs the operation. Takes a, b.
trlrpt(v, n)
Performs the operation. Takes v, n.
trlset(xs, idx, v)
Performs the operation. Takes xs, idx, v.
trlshuf(xs)
Performs the operation. Takes xs.
trlstne(xs)
Creates a new instance. Takes xs.
trlstpo(xs)
Performs the operation. Takes xs.
trlstps(xs)
Performs the operation. Takes xs.
These are the public-facing names you call with use trl:
trl.but(xs)trl.map(xs, f)trl.fil(xs, f)trl.all(xs, f)trl.any(xs, f)trl.sel(xs, f)trl.idx(xs, f)trl.tly(xs, f)trl.eac(xs, f)trl.flm(xs, f)trl.grp(xs, f)trl.fld(xs, z0, f)trl.rev(xs)trl.unq(xs)trl.zip(a, b)trl.srt(xs)trl.cat(a, b)trl.partition(xs, pred)trl.take(xs, n)trl.drop(xs, n)trl.zip_with(a, b, f)trl.filt(xs, f)trl.cnt(xs, v)trl.has(xs, v)trl.uniq(xs)trl.sort(xs)trl.sum(xs)trl.sub(xs, a, b)trl.slice(xs, a, b)trl.slc(xs, a, b)trl.max(lst)trl.min(lst)trl.range(n)trl.red(xs, z0, f)trl.cp(xs)trl.fnd(xs, f)trl.keys(o)trl.flat(xs)trl.mode(xs)trl.mg(a, b)trl.join(xs, sep)trl.trlpa(xs, pred)trl.group(xs, f)trl.idxof(xs, v)trl.len(xs)trl.prc(xs, f)trl.rm(xs, v)trl.rnge(a, b)trl.rpt(v, n)trl.set(xs, i, v)trl.shuf(xs)trl.stne(xs)trl.stpo(xs)trl.stps(xs)trl.ta(xs, n)trl.tostr(xs)
Notes
- List/collection transforms - map, filter, reduce, sort, group.
- Core utility used throughout the stdlib.