TupleN

libretto.lambda.TupleN
See theTupleN companion object
sealed trait TupleN[[_, _], Nil, F[_], A]

An n-ary tuple of values F[Ai], where A = Nil ∙ A1 ∙ ... ∙ An where associates to the left.

Unlike Bin, which is an arbitrarily nested binary tree, the shape of nesting in TupleN is prescribed to be always associated to the left and is conceptually used to represent flat n-ary tuples.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Single[, Nil, F, A]
class Snoc[, Nil, F, Init, Last]

Members list

Value members

Abstract methods

def foldL[G[_]](first: [a] => F[a] => G[Nil a], snoc: [a, b] => (x$1: G[a], x$2: F[b]) => G[a b]): G[A]
def nonEmpty[R](k: [A1, A2] => (A =:= (A1 A2)) ?=> R): R
def size: Int
def translate[G[_]](h: [a] => F[a] => G[a]): TupleN[, Nil, G, A]
def unravel[G[_, _]](f: [X] => F[X] => G[X, X]): ParN[, Nil, G, A, A]

Concrete methods

def toList[B](f: [a] => F[a] => B): ::[B]
def [B](b: F[B]): TupleN[, Nil, F, A B]