Package

sclib

patterns

Permalink

package patterns

pattern's

check the member documentation for examples

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. patterns
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. object AppF

    Permalink

    simple AppFunction

    simple AppFunction

    Example:
    1. scala> import sclib.patterns._
      scala> import sclib.ops.either._
      scala> val action = for {
           |   a <- AppF{i: Int => i.right[String]}
           |   b <- AppF{i: Int => if(i < 5) (i * 10).right else "BOOM".left}
           |   c <- AppF.lift(33.right[String])
           | } yield (a, b, c)
      action: sclib.z.EitherT[[B]sclib.z.Reader[Int,B],String,(Int, Int, Int)] = EitherT(Reader(<function1>))
      scala> action.runEitherT.runReader(2)
      res0: Either[String,(Int, Int, Int)] = Right((2,20,33))
      scala> action.runEitherT.runReader(8)
      res1: Either[String,(Int, Int, Int)] = Left(BOOM)

Inherited from AnyRef

Inherited from Any

Ungrouped