diff options
| author | Ben Culkin <scorpress@gmail.com> | 2022-10-08 14:47:21 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2022-10-08 14:47:21 -0400 |
| commit | 0f958b08b3446a866418aa485bb60c208d952033 (patch) | |
| tree | 2a54b64036bacb2f1fbc60d17511eb904b15fe7d /src/main/java/bjc/data/Holder.java | |
| parent | 08885862bee89602d7edc55144ea9b6af780bfa4 (diff) | |
Add a whole bunch of Optics
This adds a whole bunch of types/functions related to optics. With this
batch, I've mainly gone for the concrete representation types, instead
of var Laarhoven or profunctor representations.
The concrete ones require less infrastructure, though they are not as
easy to compose
There's also a number of misc. things in here
Diffstat (limited to 'src/main/java/bjc/data/Holder.java')
| -rw-r--r-- | src/main/java/bjc/data/Holder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/bjc/data/Holder.java b/src/main/java/bjc/data/Holder.java index 4a1de75..57a5d6c 100644 --- a/src/main/java/bjc/data/Holder.java +++ b/src/main/java/bjc/data/Holder.java @@ -26,6 +26,7 @@ import bjc.data.internals.WrappedLazy; import bjc.data.internals.WrappedOption; import bjc.funcdata.FunctionalList; import bjc.funcdata.theory.Functor; +import bjc.typeclasses.Container; /** * A holder of a single value. @@ -35,7 +36,8 @@ import bjc.funcdata.theory.Functor; * @param <ContainedType> * The type of value held. */ -public interface Holder<ContainedType> extends Functor<ContainedType> { +public interface Holder<ContainedType> extends Functor<ContainedType>, Container<ContainedType, Holder<ContainedType>> { + // note: to really work, this should also take the binding parameter /** * Bind a function across the value in this container. * |
