@@ -139,7 +139,7 @@ export const mapEffect: {
|
||||
)),
|
||||
}))
|
||||
|
||||
export const mapStructAt: {
|
||||
export const mapStructField: {
|
||||
<A extends object, K extends keyof A, ER, EW, RR, RW>(
|
||||
self: Lens<A, ER, EW, RR, RW>,
|
||||
key: K,
|
||||
@@ -296,11 +296,11 @@ Effect.gen(function*() {
|
||||
|
||||
const myValueLens = ref.pipe(
|
||||
fromSubscriptionRef,
|
||||
mapStructAt("values"),
|
||||
mapStructField("values"),
|
||||
mapArrayAt(1),
|
||||
)
|
||||
|
||||
const myValueLens2 = mapArrayAt(mapStructAt(fromSubscriptionRef(ref), "values"), 1)
|
||||
const myValueLens2 = mapArrayAt(mapStructField(fromSubscriptionRef(ref), "values"), 1)
|
||||
|
||||
console.log(yield* ref.get, yield* myValueLens.get)
|
||||
yield* set(myValueLens, 22)
|
||||
|
||||
Reference in New Issue
Block a user