Change `non` to take a `Prism` #293

Closed
ekmett opened this Issue Mar 28, 2013 · 1 comment

Projects

None yet

2 participants

@ekmett
Owner
ekmett commented Mar 28, 2013

This would let us use

foo & at 5.non _Empty.at 6 .~ "hello"
bar & at 5.non _Zero +~ 1

... assuming appropriate _Empty and _Zero prisms.

@shachaf shachaf was assigned Mar 28, 2013
@ekmett
Owner
ekmett commented Mar 28, 2013
[19:51] shachaf:     @ty \p -> anon (review (clonePrism p) ()) (has (clonePrism p))
[19:51] lambdabot:   (Functor f, Profunctor p) => APrism t t a () -> p t (f t) -> p (Maybe t) (f (Maybe t))
@glguy glguy added a commit that closed this issue Mar 29, 2013
@glguy glguy Change 'anon' to take a 'Prism'
Close #293
b491c9a
@glguy glguy closed this in b491c9a Mar 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment