diff --git a/packages/effect-lens-next/src/Lens.ts b/packages/effect-lens-next/src/Lens.ts index 784c5d6..3dddf59 100644 --- a/packages/effect-lens-next/src/Lens.ts +++ b/packages/effect-lens-next/src/Lens.ts @@ -912,6 +912,11 @@ export const focusOption: { */ export const get = (self: Lens): Effect.Effect => self.get +/** + * Returns the stream of changes from a `Lens`. + */ +export const changes = (self: Lens): Stream.Stream => self.changes + /** * Atomically modifies the value of a `Lens` and returns a computed result. */ diff --git a/packages/effect-lens-next/src/View.ts b/packages/effect-lens-next/src/View.ts index a32e8a7..c6871db 100644 --- a/packages/effect-lens-next/src/View.ts +++ b/packages/effect-lens-next/src/View.ts @@ -244,3 +244,14 @@ export const focusChunkSize = ( export const focusIterableSize = , E, R>( self: View, ): View => map(self, Iterable.size) + + +/** + * Reads the current value from a `View`. + */ +export const get = (self: View): Effect.Effect => self.get + +/** + * Returns the stream of changes from a `View`. + */ +export const changes = (self: View): Stream.Stream => self.changes