Skip to main content

sequence.tppl

function all​

function all[X](f : Function(X) => Bool, l : X[]) => Bool

function any​

function any[X](f : Function(X) => Bool, l : X[]) => Bool

function concat​

function concat[X](l : X[], r : X[]) => X[]

function cons​

function cons[X](e : X, s : X[]) => X[]

function fold​

function fold[A, B](f : Function(A, B)=>A, init : A, seq : B[]) => A

function foldi​

function foldi[A, B](f : Function(A, Int, B)=>A, init : A, seq : B[]) => A

function length​

function length[X](l : X[]) => Int

function paste​

function paste[X](l : X[][], sep : X[]) => X[]

function paste0​

function paste0[X](l : X[][]) => X[]

function qSort​

function qSort[X](cmp : Function(X, X)=>Int, l : X[]) => X[]

function rep​

function rep[X](count : Int, elem : X) => X[]

function repApply​

function repApply[X](count : Int, f : Function(Int) => X) => X[]

function repDraw​

function repDraw[X](count : Int, dist : Dist[X]) => X[]

function sapply​

function sapply[A, B](s : A[], f : Function(A)=>B) => B[]

function sapplyi​

function sapplyi[A, B](s : A[], f : Function(Int, A)=>B) => B[]

function seqNormalize​

function seqNormalize(s : Real[]) => Real[]

function seqSumInt​

function seqSumInt(s : Int[]) => Int

function seqSumReal​

function seqSumReal(s : Real[]) => Real

function slice​

function slice[X](l : X[], first : Int, last : Int) => X[]

function whichTrue​

function whichTrue(s : Bool[]) => Int[]

function zipWith​

function zipWith[A, B, C](f : Function(A, B) => C, a : A[], b : B[]) => C[]