Trait/Object

scalaz

DList

Related Docs: object DList | package scalaz

Permalink

trait DList[A] extends AnyRef

Difference lists: a data structure for O(1) append on lists. Based on Data.DList, a Haskell library by Don Stewart.

A difference list is a function that given a list, returns the original contents of the difference list prepended at the given list.

This structure supports O(1) append and snoc operations on lists, making it very useful for append-heavy uses, such as logging and pretty printing.

Source
DList.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DList
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(xs: ⇒ List[A]): Trampoline[List[A]]

    Permalink

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++(as: ⇒ DList[A]): DList[A]

    Permalink

    Append one list to another in constant time.

  4. def +:(a: A): DList[A]

    Permalink

    Prepend a single element in constant time.

  5. def :+(a: A): DList[A]

    Permalink

    Append a single element in constant time.

  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def flatMap[B](f: (A) ⇒ DList[B]): DList[B]

    Permalink

    Map over a difference list, then flatten.

  13. def foldr[B](z: ⇒ B)(f: (A, ⇒ B) ⇒ B): B

    Permalink

    Fold over a difference list.

  14. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def head: A

    Permalink

    Get the first element of the list.

  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def map[B](f: (A) ⇒ B): DList[B]

    Permalink

    Map over a difference list.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  23. def tail: DList[A]

    Permalink

    Get the tail of the list.

  24. def toList: List[A]

    Permalink

    Convert to a normal list.

  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def uncons[B](z: ⇒ B, f: (A, DList[A]) ⇒ B): B

    Permalink

    List elimination of head and tail.

  27. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped