RenderableFunction

com.phasmidsoftware.lascala.fp.RenderableFunction
See theRenderableFunction companion class

Companion object to RenderableFunction

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[R : ClassTag](arity: Int, func: Product => R, w: String, cbn: Seq[Boolean], cs: ParamClasses): RenderableFunction[R]
def apply[R : ClassTag](f: () => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]

The following apply functions are in pairs: one with FunctionString and one with just String as the second parameter.

The following apply functions are in pairs: one with FunctionString and one with just String as the second parameter.

Type parameters

R

the result type

Value parameters

f

a function of some mix of T resulting in R

w

a String or a FunctionString

Attributes

Returns

a new RenderableFunction

def apply[R : ClassTag](f: () => R, w: String, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T : ClassTag, R : ClassTag](f: T => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T : ClassTag, R : ClassTag](f: T => R, w: String, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, R : ClassTag](f: (T1, T2) => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, R : ClassTag](f: (T1, T2) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, R : ClassTag](f: (T1, T2, T3) => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, R : ClassTag](f: (T1, T2, T3) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4) => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5) => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6) => R, w: FunctionString, cbn: Seq[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, T7 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6, T7) => R, w: FunctionString, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, T7 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6, T7) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, T7 : ClassTag, T8 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6, T7, T8) => R, w: FunctionString, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, T7 : ClassTag, T8 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6, T7, T8) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, T7 : ClassTag, T8 : ClassTag, T9 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => R, w: FunctionString, cbn: List[Boolean]): RenderableFunction[R]
def apply[T1 : ClassTag, T2 : ClassTag, T3 : ClassTag, T4 : ClassTag, T5 : ClassTag, T6 : ClassTag, T7 : ClassTag, T8 : ClassTag, T9 : ClassTag, R : ClassTag](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => R, w: String, cbn: List[Boolean]): RenderableFunction[R]
def asFunctionType[R](f: () => R): Product => R
def asTupledFunctionType[R](f: () => R): Product => R
def asTupledFunctionType[T1, R](f: T1 => R): Product => R
def asTupledFunctionType[T1, T2, R](f: (T1, T2) => R): Product => R
def asTupledFunctionType[T1, T2, T3, R](f: (T1, T2, T3) => R): Product => R
def asTupledFunctionType[T1, T2, T3, T4, R](f: (T1, T2, T3, T4) => R): Product => R
def asTupledFunctionType[T1, T2, T3, T4, T5, R](f: (T1, T2, T3, T4, T5) => R): Product => R
def asTupledFunctionType[T1, T2, T3, T4, T5, T6, R](f: (T1, T2, T3, T4, T5, T6) => R): Product => R
def asTupledFunctionType[T1, T2, T3, T4, T5, T6, T7, R](f: (T1, T2, T3, T4, T5, T6, T7) => R): Product => R
def asTupledFunctionType[T1, T2, T3, T4, T5, T6, T7, T8, R](f: (T1, T2, T3, T4, T5, T6, T7, T8) => R): Product => R
def asTupledFunctionType[T1, T2, T3, T4, T5, T6, T7, T8, T9, R](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => R): Product => R
def asserting[A](b: => Boolean, w: => String, f: => A): A
def callByName(n: Int): List[Boolean]
def callByValue(n: Int): List[Boolean]
def convert[T : ClassTag](x: Any): T

This is similar to the toScala method except that it isn't concerned with converting Java types to Scala. For now, there is no attempt at conversion unless T is a String. If the value cannot be converted, an exception will be thrown.

This is similar to the toScala method except that it isn't concerned with converting Java types to Scala. For now, there is no attempt at conversion unless T is a String. If the value cannot be converted, an exception will be thrown.

Type parameters

T

the return type

Value parameters

x

an Any

Attributes

Returns

a T

def getPartialApplicationFunction[T, R](n: Int, f: Product => R, t: T, cbn: Boolean)(implicit tt: ClassTag[T], rt: ClassTag[R]): Product => R

This method is used to partially apply the given function (f), with the given parameter (t) and yield a function with arity one less than that of f.

This method is used to partially apply the given function (f), with the given parameter (t) and yield a function with arity one less than that of f.

Type parameters

R

the type of the result of invoking f

T

the type of t

Value parameters

cbn

if true then the parameter is satisfied via call-by-name

f

the function to be partially applied

n

the arity of f

t

the parameter to be applied to f

Attributes

Returns

a function of arity n-1 which is the result of applying t to f

def partiallyApply[T, R : ClassTag](n: Int, f: Product => R, t: T, w: FunctionString, cbn: Seq[Boolean], cs: ParamClasses): Try[RenderableFunction[R]]

private

private

Attributes

def toScala[T : ClassTag](t: Any): T
def tupled[T1 : ClassTag, R : ClassTag](f: T1 => R): (Tuple1[T1]) => R
def untupled[T, R](f: (Tuple1[T]) => R): T => R
def varargs[T : ClassTag](n: Int): RenderableFunction[Seq[T]]

Method to create a varargs function.

Method to create a varargs function.

NOTE: this is limited in the value of n which it can support (currently 7)

NOTE: there is a far superior way of dealing with varargs: Closure.createVarArgsClosure

Type parameters

T

the type of the parameters

Value parameters

n

the number of args: a number less than or equal to 7

Attributes

Returns

a RenderableFunction which yields a List[T]

See also

Closure

Givens

Givens

Renders a RenderableFunction as its FunctionString.

Renders a RenderableFunction as its FunctionString.

Attributes