scala

Function

object Function

A module defining utility methods for higher-order functional programming.

Source
Function.scala
Version

1.0, 29/11/2006

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Function
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def chain[a](fs: Seq[(a) ⇒ a]): (a) ⇒ a

    Given a sequence of functions f1, .

    Given a sequence of functions f1, ..., fn, return the function f1 andThen ... andThen fn.

    fs

    The given sequence of functions

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def const[T, U](x: T)(y: U): T

    The constant function

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. def tupled[a1, a2, a3, a4, a5, b](f: (a1, a2, a3, a4, a5) ⇒ b): ((a1, a2, a3, a4, a5)) ⇒ b

    Tupling for functions of arity 5.

    Tupling for functions of arity 5. This transforms a function of arity 5 into a unary function that takes a 5-tuple of arguments.

  22. def tupled[a1, a2, a3, a4, b](f: (a1, a2, a3, a4) ⇒ b): ((a1, a2, a3, a4)) ⇒ b

    Tupling for functions of arity 4.

    Tupling for functions of arity 4. This transforms a function of arity 4 into a unary function that takes a 4-tuple of arguments.

  23. def tupled[a1, a2, a3, b](f: (a1, a2, a3) ⇒ b): ((a1, a2, a3)) ⇒ b

    Tupling for functions of arity 3.

    Tupling for functions of arity 3. This transforms a function of arity 3 into a unary function that takes a triple of arguments.

  24. def tupled[a1, a2, b](f: (a1, a2) ⇒ b): ((a1, a2)) ⇒ b

    Tupling for functions of arity 2.

    Tupling for functions of arity 2. This transforms a function of arity 2 into a unary function that takes a pair of arguments.

    Note

    These functions are slotted for deprecation, but it is on hold pending superior type inference for tupling anonymous functions.

  25. def uncurried[a1, a2, a3, a4, a5, b](f: (a1) ⇒ (a2) ⇒ (a3) ⇒ (a4) ⇒ (a5) ⇒ b): (a1, a2, a3, a4, a5) ⇒ b

    Uncurrying for functions of arity 5.

  26. def uncurried[a1, a2, a3, a4, b](f: (a1) ⇒ (a2) ⇒ (a3) ⇒ (a4) ⇒ b): (a1, a2, a3, a4) ⇒ b

    Uncurrying for functions of arity 4.

  27. def uncurried[a1, a2, a3, b](f: (a1) ⇒ (a2) ⇒ (a3) ⇒ b): (a1, a2, a3) ⇒ b

    Uncurrying for functions of arity 3.

  28. def uncurried[a1, a2, b](f: (a1) ⇒ (a2) ⇒ b): (a1, a2) ⇒ b

    Uncurrying for functions of arity 2.

    Uncurrying for functions of arity 2. This transforms a unary function returning another unary function into a function of arity 2.

  29. def unlift[T, R](f: (T) ⇒ Option[R]): PartialFunction[T, R]

    Turns a function A => Option[B] into a PartialFunction[A, B].

    Turns a function A => Option[B] into a PartialFunction[A, B].

    Important note: this transformation implies the original function may be called 2 or more times on each logical invocation, because the only way to supply an implementation of isDefinedAt is to call the function and examine the return value. See also scala.PartialFunction, method applyOrElse.

    f

    a function T => Option[R]

    returns

    a partial function defined for those inputs where f returns Some(_) and undefined where f returns None.

    See also

    scala.PartialFunction, method lift.

  30. def untupled[a1, a2, a3, a4, a5, b](f: ((a1, a2, a3, a4, a5)) ⇒ b): (a1, a2, a3, a4, a5) ⇒ b

    Un-tupling for functions of arity 5.

    Un-tupling for functions of arity 5. This transforms a function taking a 5-tuple of arguments into a function of arity 5 which takes each argument separately.

  31. def untupled[a1, a2, a3, a4, b](f: ((a1, a2, a3, a4)) ⇒ b): (a1, a2, a3, a4) ⇒ b

    Un-tupling for functions of arity 4.

    Un-tupling for functions of arity 4. This transforms a function taking a 4-tuple of arguments into a function of arity 4 which takes each argument separately.

  32. def untupled[a1, a2, a3, b](f: ((a1, a2, a3)) ⇒ b): (a1, a2, a3) ⇒ b

    Un-tupling for functions of arity 3.

    Un-tupling for functions of arity 3. This transforms a function taking a triple of arguments into a ternary function which takes each argument separately.

  33. def untupled[a1, a2, b](f: ((a1, a2)) ⇒ b): (a1, a2) ⇒ b

    Un-tupling for functions of arity 2.

    Un-tupling for functions of arity 2. This transforms a function taking a pair of arguments into a binary function which takes each argument separately.

  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped