yarrow.functor.optic

Functors to diagrams of optics.

This module contains a class FrobeniusOpticFunctor, which can be used to implement a functor from diagrams into a category of optics.

class yarrow.functor.optic.FrobeniusOpticFunctor
abstract map_fwd_objects(objects: AbstractFiniteFunction) AbstractIndexedCoproduct
abstract map_rev_objects(objects: AbstractFiniteFunction) AbstractIndexedCoproduct
abstract residuals(ops: Operations) AbstractIndexedCoproduct
abstract map_fwd_operations(ops: Operations) AbstractDiagram
abstract map_rev_operations(ops: Operations) AbstractDiagram
map_objects(objects: AbstractFiniteFunction) AbstractIndexedCoproduct

Implements map_objects in terms of map_fwd_objects and map_rev_objects.

map_operations(ops: Operations) AbstractDiagram

Implements map_operations using map_fwd_operations and map_rev_operations.

yarrow.functor.optic.lens_fwd(ops: Operations, copy_label) AbstractDiagram
yarrow.functor.optic.adapt_optic(optic: AbstractDiagram, Afwd, Arev, Bfwd, Brev)