Bin

libretto.lambda.Bin
See theBin companion object
sealed trait Bin[<*>[_, _], T[_], F[_], A]

Binary tree with leafs holding values of types F[X], F[Y], ... The complete structure of the tree is expressed by the type A, using the tags for branches and leafs.

Attributes

<*>

tag for branches

A

captures the complete structure of the tree

F

value type of leafs. Each leaf holds a value of type F[T], for some type T.

T

tag for leafs.

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Branch[<*>, T, F, A, B]
class Leaf[<*>, T, F, A]

Members list

Concise view

Type members

Classlikes

enum Partitioned[G[_], H[_], ~⚬[_, _]]

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
case Both[G, H, X, Y, ~⚬]

Value members

Concrete methods

def <*>[B](that: Bin[<*>, T, F, B]): Bin[<*>, T, F, A <*> B]
def deduplicateLeafs[->[_, _]](dup: [x] => (x$1: F[x]) => ->[T[x], T[x] <*> T[x]])(using leafTest: UniqueTypeArg[F], shuffled: Shuffled[->, <*>]): Exists[[X] =>> (Bin[<*>, T, F, X], Shuffled[X, A])]
def foldMap[G[_]](map: [x] => (x$1: F[x]) => G[T[x]], zip: [x, y] => (x$1: G[x], x$2: G[y]) => G[x <*> y]): G[A]
def foldMap0[B](map: [x] => (x$1: F[x]) => B, reduce: (B, B) => B): B
def getValue[V](using leafIsNotBranch: [x, y, z] => (x$1: T[x] =:= y <*> z) => Nothing, T: Injective[T], ev: A =:= T[V]): F[V]
def mapLeafs[G[_]](f: [x] => (x$1: F[x]) => G[x]): Bin[<*>, T, G, A]
def mask: Masked[[_] =>> Bin[<*>, T, F, _$5], A]
def partition[G[_], H[_]](f: [x] => (x$1: F[x]) => Either[G[x], H[x]])(using shuffle: Shuffle[<*>]): Partitioned[G, H, ~⚬]
def product[B, ->[_, _]](that: Bin[<*>, T, F, B])(discardFst: [X, Y] => (x$1: F[X]) => ->[T[X] <*> Y, Y])(using leafTest: UniqueTypeArg[F], shuffled: Shuffled[->, <*>]): Exists[[P] =>> (Bin[<*>, T, F, P], Shuffled[P, A], Shuffled[P, B])]