scalaz

DList

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
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

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

Concrete 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. def ++(as: ⇒ DList[A]): DList[A]

    Append one list to another in constant time.

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

    Prepend a single element in constant time.

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

    Append a single element in constant time.

  7. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  10. def clone(): AnyRef

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

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

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

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

    Map over a difference list, then flatten.

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

    Fold over a difference list.

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

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

    Definition Classes
    AnyRef → Any
  18. def head: A

    Get the first element of the list.

  19. final def isInstanceOf[T0]: Boolean

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

    Map over a difference list.

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

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

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

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

    Definition Classes
    AnyRef
  25. def tail: DList[A]

    Get the tail of the list.

  26. def toList: List[A]

    Convert to a normal list.

  27. def toString(): String

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

    List elimination of head and tail.

  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped