Skip to content

Commit 9f85358

Browse files
committed
Fixed example.
1 parent 1a5bc27 commit 9f85358

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/Main.purs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@ foo = lens _.foo (_ { foo = _ })
1616
bar :: forall a b r. Lens { bar :: a | r } { bar :: b | r } a b
1717
bar = lens _.bar (_ { bar = _ })
1818

19-
_Just :: forall a b r. Prism (Maybe a) (Maybe b) a b
20-
_Just = prism Just (maybe (Left Nothing) Right)
21-
2219
type Foo a = { foo :: Maybe { bar :: Array a } }
2320

2421
doc :: Foo String
2522
doc = { foo: Just { bar: [ "Hello", " ", "World" ]} }
2623

2724
bars :: forall a b. Traversal (Foo a) (Foo b) a b
28-
bars = foo <<< _Just <<< bar <<< traverse
25+
bars = foo <<< _Just <<< bar <<< traversed
2926

3027
main = print $ view bars doc

0 commit comments

Comments
 (0)