Packages

o

scalaz.example

CABRunLengthEncoder

object CABRunLengthEncoder

Source
ReaderWriterStateTUsage.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CABRunLengthEncoder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type RunLength[A] = IndexedReaderWriterStateT[Free.Trampoline, RunLengthConfig, Cord, RunLengthState, RunLengthState, A]
  2. case class RunLengthConfig(minRun: Int) extends Product with Serializable

    the configuration of our encoder, this will be used in the Reader part of our RWST

  3. case class RunLengthState(lastToken: Option[Token], length: Int, input: List[Token]) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def done: RunLength[Boolean]

    have we exhausted the input?

  7. def emit: RunLength[Unit]

    emit the lastToken

  8. def encode(minRun: Int, input: List[Token]): String
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def maybeEmit: RunLength[Unit]

    emit tokens if the next input token is different than the last

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. val readToken: RunLength[Token]

    read a token from the input

  20. val readToken2: RunLength[Token]

    with the above syntax imported, we can perform the same computation as above, but use a for comprehension

  21. val rle: MonadReader[[ε$6$]IndexedReaderWriterStateT[Free.Trampoline, RunLengthConfig, Cord, RunLengthState, RunLengthState, ε$6$], RunLengthConfig] with MonadState[[ε$7$]IndexedReaderWriterStateT[Free.Trampoline, RunLengthConfig, Cord, RunLengthState, RunLengthState, ε$7$], RunLengthState] with MonadListen[[ε$8$]IndexedReaderWriterStateT[Free.Trampoline, RunLengthConfig, Cord, RunLengthState, RunLengthState, ε$8$], Cord]
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  27. def writeOutput(token: Token, length: Int, minRun: Int): RunLength[Unit]

    put output on the writer

  28. object RunLengthState extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped