<div dir="ltr"><div>There are some constructs like this in Dunai and Yampa (but not generalized).</div><div><br></div><div>The first one indeed uses ArrowChoice:</div><div><br></div><div><a href="https://hackage.haskell.org/package/dunai-0.8.2/docs/src/Data.MonadicStreamFunction.Util.html#mapMaybeS">https://hackage.haskell.org/package/dunai-0.8.2/docs/src/Data.MonadicStreamFunction.Util.html#mapMaybeS</a></div><div><br></div><div>The other two seem to be implementing some similar (ad hoc) choice, but it can be hard to tell sometimes:<br></div><div><br></div><div><a href="https://hackage.haskell.org/package/dunai-0.8.2/docs/src/Control.Monad.Trans.MSF.List.html#mapMSF">https://hackage.haskell.org/package/dunai-0.8.2/docs/src/Control.Monad.Trans.MSF.List.html#mapMSF</a></div><div><a href="https://hackage.haskell.org/package/Yampa-0.13.5/docs/src/FRP.Yampa.Switches.html#parC">https://hackage.haskell.org/package/Yampa-0.13.5/docs/src/FRP.Yampa.Switches.html#parC</a></div><div><br></div><div>Ivan</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 17 Jun 2022 at 11:29, Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Jun 17, 2022 at 05:01:55PM +0200, Olaf Klinke wrote:<br>
> Is there prior art to the following generalisation? <br>
<br>
> traverseArrow :: Traversable t => a x y -> a (t x) (t y) <br>
<br>
Perhaps you are looking for this:<br>
<br>
<a href="https://github.com/tomjaguarpaw/Arrows2/issues/3#issuecomment-561973678" rel="noreferrer" target="_blank">https://github.com/tomjaguarpaw/Arrows2/issues/3#issuecomment-561973678</a><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>