Thanks for the helpful thoughts. <div><br></div><div>I guess I was just reaching for a Haskell version of a programming pattern from other languages---dealing with baggage if you will. </div><div><br></div><div>Thanks,</div>
<div>Aran</div><div><br></div><div><div class="gmail_quote">On Fri, Feb 5, 2010 at 7:24 PM, Luke Palmer <span dir="ltr"><<a href="mailto:lrpalmer@gmail.com">lrpalmer@gmail.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 Fri, Feb 5, 2010 at 10:34 AM, Aran Donohue <<a href="mailto:aran.donohue@gmail.com">aran.donohue@gmail.com</a>> wrote:<br>
> What would be an idiomatic Haskell way to accomplish this? Currently I've<br>
> got "liftedPartitionEithers :: [a] -> (a -> Either b c) -> ([a], [a])" which<br>
> is my own version of partitionEithers that calls a selector first.<br>
<br>
</div>Since you are not using b or c anywhere else, the only thing you care<br>
about in that Either is whether it is Left or Right. Which makes it<br>
seem much more like a Bool. After this conversion, I can hoogle for<br>
your signature.<br>
<br>
<a href="http://haskell.org/hoogle/?hoogle=[a]+-%3E+%28a+-%3E+Bool%29+-%3E+%28[a]%2C[a]%29" target="_blank">http://haskell.org/hoogle/?hoogle=[a]+-%3E+%28a+-%3E+Bool%29+-%3E+%28[a]%2C[a]%29</a><br>
<br>
Which gives, among other things, Data.List.partition :: (a -> Bool) -><br>
[a] -> ([a],[a]).<br>
<br>
Without more details about the precise thing you want to accomplish, I<br>
don't know what else to say. Many idioms are about the details of the<br>
problem, even down to argument order.<br>
<font color="#888888"><br>
Luke<br>
</font></blockquote></div><br></div>