<div class="gmail_quote"><br></div><div class="gmail_quote">On Tue, Nov 20, 2012 at 1:44 PM, Bryan O'Sullivan <span dir="ltr"><<a href="mailto:bos@serpentine.com" target="_blank">bos@serpentine.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, Nov 20, 2012 at 10:39 AM, Edward Kmett <span dir="ltr"><<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>We converted to (&) because of its incredible terseness and general lack of use across hackage. For DSL purposes, to me it is key that this operator be as succinct as possible and (&) is remarkably underutilized in haskell libraries today, due to the fact that (|) is taken by syntax, and our C-inspired brains tend to pair them.</div>
<span><font color="#888888">
<div></div></font></span></blockquote></div><br></div><div>That seems fairly convincing to me. Count me as a +1 on Yitz's original proposal of & *or* on |> instead, whichever wins in the court of popular opinion.</div>
<div><br></div><div>I assume this will have the not-very exciting type of</div><div><br></div><div>(a -> b) -> (b -> c) -> a -> c</div><div><br></div><div>?</div>
</blockquote></div><br><div><span style="font-size:12.727272033691406px;background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif">(&) :: a -> (a -> b) -> b</span><br><br><div class="gmail_quote">
it is just flip ($)</div></div><div><br></div><div>>>> ("hello","world") & _1.traverse %~ toUpper & _2 .~ 42</div><div>("HELLO",42)</div><div><br></div><div>could be written</div>
<div><br></div><div>_2 .~ 42 $ _1.traverse .~ toUpper $ ("hello","world")</div><div><br></div><div>but that goes in the opposite direction of the corresponding code for working with the state monad with lenses:</div>
<div><br></div><div>foo = do</div><div> _1.traverse %= toUpper</div><div> _2 .~ "42"</div><div><br></div><div>-Edward</div>