BinarySearchTree

libretto.scaletto.BinarySearchTree
See theBinarySearchTree companion object
class BinarySearchTree[DSL <: Scaletto, CLib <: CoreLib[DSL], SLib <: ScalettoLib[DSL, CLib]](val dsl: DSL, val coreLib: CLib & CoreLib[DSL], val scalettoLib: SLib & ScalettoLib[DSL, CLib & CoreLib[DSL]])

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

object Branch

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Branch.type
opaque object BranchF

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
BranchF.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
opaque object Singleton

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
opaque object Summary

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Summary.type

Types

type Branch[K, V] = BranchF[K, NonEmptyTree[K, V]]
type NonEmptyTree[K, V] = Rec[[_] =>> NonEmptyTreeF[K, V, _$3]]
type NonEmptyTreeF[K, V, X] = Singleton[K, V] |+| BranchF[K, X]
type Tree[K, V] = Done |+| NonEmptyTree[K, V]

Value members

Concrete methods

def clear[K, V](f: V -⚬ Done): Tree[K, V] -⚬ Done
def delete[K : Ordering, V]: Val[K] |*| Tree[K, V] -⚬ Maybe[V] |*| Tree[K, V]
def empty[K, V]: Done -⚬ Tree[K, V]
def insert[K : Ordering, V]: Val[K] |*| V |*| Tree[K, V] -⚬ Maybe[V] |*| Tree[K, V]
def insertOrUpdate[K : Ordering, V](update: V |*| V -⚬ V): Val[K] |*| V |*| Tree[K, V] -⚬ Tree[K, V]

Attributes

update

function used to update the current value under the given key, if any. The first argument of update is the new value, the second argument is the current value stored in the tree.

def singleton[K, V]: Val[K] |*| V -⚬ Tree[K, V]
def update[K : Ordering, V, A](f: A |*| V -⚬ PMaybe[V]): Val[K] |*| A |*| Tree[K, V] -⚬ PMaybe[A] |*| Tree[K, V]
def update[K : Ordering, V, A](f: A |*| V -⚬ PMaybe[V], ifAbsent: A -⚬ Done): Val[K] |*| A |*| Tree[K, V] -⚬ Tree[K, V]

Concrete fields

val coreLib: CLib & CoreLib[DSL]
val dsl: DSL
val scalettoLib: SLib & ScalettoLib[DSL, CLib & CoreLib[DSL]]