We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a5bc27 commit 9f85358Copy full SHA for 9f85358
test/Main.purs
@@ -16,15 +16,12 @@ foo = lens _.foo (_ { foo = _ })
16
bar :: forall a b r. Lens { bar :: a | r } { bar :: b | r } a b
17
bar = lens _.bar (_ { bar = _ })
18
19
-_Just :: forall a b r. Prism (Maybe a) (Maybe b) a b
20
-_Just = prism Just (maybe (Left Nothing) Right)
21
-
22
type Foo a = { foo :: Maybe { bar :: Array a } }
23
24
doc :: Foo String
25
doc = { foo: Just { bar: [ "Hello", " ", "World" ]} }
26
27
bars :: forall a b. Traversal (Foo a) (Foo b) a b
28
-bars = foo <<< _Just <<< bar <<< traverse
+bars = foo <<< _Just <<< bar <<< traversed
29
30
main = print $ view bars doc
0 commit comments