TeSSLa: TeSSLa Standard Library for TeSSLa 1.2.4

module Operators

For every function defined in the operator module there exists a special operator syntax which can be used to call the function using an infix operator.

ANCHOR add

liftable add(lhs: strict Int, rhs: strict Int): Int

Operator usage: a + b

Returns the sum of two integers

liftable def add(lhs: strict Int, rhs: strict Int): Int = extern("add")

ANCHOR and

liftable and(lhs: lazy Bool, rhs: lazy Bool): Bool

Operator usage: a && b

Boolean conjunction

liftable def and(lhs: lazy Bool, rhs: lazy Bool): Bool = extern("and")

ANCHOR bitand

liftable bitand(lhs: strict Int, rhs: strict Int): Int

Operator usage: a & b

Bitwise AND on integers

liftable def bitand(lhs: strict Int, rhs: strict Int): Int = extern("bitand")

ANCHOR bitflip

liftable bitflip(arg: strict Int): Int

Operator usage: ~a

Bitflip on integers

liftable def bitflip(arg: strict Int): Int = extern("bitflip")

ANCHOR bitor

liftable bitor(lhs: strict Int, rhs: strict Int): Int

Operator usage: a | b

Bitwise OR on integers

liftable def bitor(lhs: strict Int, rhs: strict Int): Int = extern("bitor")

ANCHOR bitxor

liftable bitxor(lhs: strict Int, rhs: strict Int): Int

Operator usage: a ^ b

Bitwise XOR on integers

liftable def bitxor(lhs: strict Int, rhs: strict Int): Int = extern("bitxor")

ANCHOR div

liftable div(lhs: strict Int, rhs: strict Int): Int

Operator usage: a / b

Returns the division of two integers

liftable def div(lhs: strict Int, rhs: strict Int): Int = extern("div")

ANCHOR eq

liftable eq[T](lhs: strict T, rhs: strict T): Bool

Operator usage: a == b

Equivalence on arbitrary data types. On complex data structures this operator checks the object's identity. Note, that this operator is defined as liftable, so it does neither check the equivalence nor the identity of streams, but applies the operator on two streams using the signal semantics.

liftable def eq[T](lhs: strict T, rhs: strict T): Bool = extern("eq")

ANCHOR fadd

liftable fadd(lhs: strict Float, rhs: strict Float): Float

Operator usage: a +. b

Returns the sum of two floats

liftable def fadd(lhs: strict Float, rhs: strict Float): Float = extern("fadd")

ANCHOR fdiv

liftable fdiv(lhs: strict Float, rhs: strict Float): Float

Operator usage: a /. b

Returns the division of two floats

liftable def fdiv(lhs: strict Float, rhs: strict Float): Float = extern("fdiv")

ANCHOR fgeq

liftable fgeq(lhs: strict Float, rhs: strict Float): Bool

Operator usage: a >=. b

Returns true if a is greater than or equal to b

liftable def fgeq(lhs: strict Float, rhs: strict Float): Bool = extern("fgeq")

ANCHOR fgt

liftable fgt(lhs: strict Float, rhs: strict Float): Bool

Operator usage: a >. b

Returns true if a is strictly greater than b

liftable def fgt(lhs: strict Float, rhs: strict Float): Bool = extern("fgt")

ANCHOR fleq

liftable fleq(lhs: strict Float, rhs: strict Float): Bool

Operator usage: a <=. b

Returns true if a is lower than or equal to b

liftable def fleq(lhs: strict Float, rhs: strict Float): Bool = extern("fleq")

ANCHOR flt

liftable flt(lhs: strict Float, rhs: strict Float): Bool

Operator usage: a <. b

Returns true if a is strictly lower than b

liftable def flt(lhs: strict Float, rhs: strict Float): Bool = extern("flt")

ANCHOR fmul

liftable fmul(lhs: strict Float, rhs: strict Float): Float

Operator usage: a *. b

Returns the multiplication of two floats

liftable def fmul(lhs: strict Float, rhs: strict Float): Float = extern("fmul")

ANCHOR fnegate

liftable fnegate(arg: strict Float): Float

Operator usage: -.a

Unary minus on floats

liftable def fnegate(arg: strict Float): Float = extern("fnegate")

ANCHOR fsub

liftable fsub(lhs: strict Float, rhs: strict Float): Float

Operator usage: a -. b

Returns the difference of two floats

liftable def fsub(lhs: strict Float, rhs: strict Float): Float = extern("fsub")

ANCHOR geq

liftable geq(lhs: strict Int, rhs: strict Int): Bool

Operator usage: a >= b

Returns true if a is greater than or equal to b

liftable def geq(lhs: strict Int, rhs: strict Int): Bool = extern("geq")

ANCHOR gt

liftable gt(lhs: strict Int, rhs: strict Int): Bool

Operator usage: a > b

Returns true if a is strictly greater than b

liftable def gt(lhs: strict Int, rhs: strict Int): Bool = extern("gt")

ANCHOR ite

liftable ite[T](cond: strict Bool, thenCase: lazy T, elseCase: lazy T): T

Operator usage: if c then a else b

If-Then-Else

liftable def ite[T](cond: strict Bool, thenCase: lazy T, elseCase: lazy T): T = extern("ite")

ANCHOR leftshift

liftable leftshift(lhs: strict Int, rhs: strict Int): Int

Operator usage: a << b

Arithmetic left shift on integers

liftable def leftshift(lhs: strict Int, rhs: strict Int): Int = extern("leftshift")

ANCHOR leq

liftable leq(lhs: strict Int, rhs: strict Int): Bool

Operator usage: a <= b

Returns true if a is lower than or equal to b

liftable def leq(lhs: strict Int, rhs: strict Int): Bool = extern("leq")

ANCHOR lt

liftable lt(lhs: strict Int, rhs: strict Int): Bool

Operator usage: a < b

Returns true if a is strictly lower than b

liftable def lt(lhs: strict Int, rhs: strict Int): Bool = extern("lt")

ANCHOR mod

liftable mod(lhs: strict Int, rhs: strict Int): Int

Operator usage: a % b

Returns the remainder of two integers

liftable def mod(lhs: strict Int, rhs: strict Int): Int = extern("mod")

ANCHOR mul

liftable mul(lhs: strict Int, rhs: strict Int): Int

Operator usage: a * b

Returns the multiplication of two integers

liftable def mul(lhs: strict Int, rhs: strict Int): Int = extern("mul")

ANCHOR negate

liftable negate(arg: strict Int): Int

Operator usage: -a

Unary minus on integers

liftable def negate(arg: strict Int): Int = extern("negate")

ANCHOR neq

liftable neq[T](lhs: strict T, rhs: strict T): Bool

Operator usage: a != b

Non-Equivalence on arbitrary data types. On complex data structures this operator checks the object's identity. Note, that this operator is defined as liftable, so it does neither check the equivalence nor the identity of streams, but applies the operator on two streams using the signal semantics.

liftable def neq[T](lhs: strict T, rhs: strict T): Bool = extern("neq")

ANCHOR not

liftable not(arg: strict Bool): Bool

Operator usage: !x

Boolean complement

liftable def not(arg: strict Bool): Bool = extern("not")

ANCHOR or

liftable or(lhs: lazy Bool, rhs: lazy Bool): Bool

Operator usage: a || b

Boolean disjunction

liftable def or(lhs: lazy Bool, rhs: lazy Bool): Bool = extern("or")

ANCHOR rightshift

liftable rightshift(lhs: strict Int, rhs: strict Int): Int

Operator usage: a >> b

Arithmetic right shift on integers

liftable def rightshift(lhs: strict Int, rhs: strict Int): Int = extern("rightshift")

ANCHOR staticite

staticite[T](cond: strict Bool, thenCase: lazy Events[T], elseCase: lazy Events[T]): Events[T]

Operator usage: static if c then a else b

static If-Then-Else

def staticite[T](cond: strict Bool, thenCase: lazy Events[T], elseCase: lazy Events[T]): Events[T] = extern("staticite")

ANCHOR sub

liftable sub(lhs: strict Int, rhs: strict Int): Int

Operator usage: a - b

Returns the difference of two integers

liftable def sub(lhs: strict Int, rhs: strict Int): Int = extern("sub")