<div class="gmail_quote">On Fri, Oct 8, 2010 at 8:00 AM, Ross Paterson <span dir="ltr"><<a href="mailto:ross@soi.city.ac.uk">ross@soi.city.ac.uk</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"><br></div>
text base bytestring type in text (or equivalent if absent)<br>
---------------------------------------------------------------------------<br>
break - breakSubstring Text -> Text -> (Text, Text)<br>
breakBy break break (Char -> Bool) -> Text -> (Text, Text)<br>
<div class="im">breakEnd - - Text -> Text -> (Text, Text)<br>
</div>- - breakEnd (Char -> Bool) -> Text -> (Text, Text)<br>
count - - Text -> Text -> Int<br>
- - count Char -> Text -> Int<br>
<div class="im">find - - Text -> Text -> [(Text, Text)]<br>
</div>findBy find find (Char -> Bool) -> Text -> Maybe Char<br>
partitionBy partition - (Char -> Bool) -> Text -> (Text, Text)<br>
replicate - - Int -> Text -> Text<br>
- replicate replicate Int -> Char -> Text<br>
spanBy span span (Char -> Bool) -> Text -> (Text, Text)<br>
split - - Text -> Text -> [Text]<br>
- - split Char -> Text -> [Text]<br>
splitBy - splitWith (Char -> Bool) -> Text -> [Text]<br>
<div class="im">unfoldrN - - Int -> (a -> Maybe (Char, a)) -> a -> Text<br>
</div>- - unfoldrN Int -> (a -> Maybe (Char, a)) -> a -> (Text, Maybe a)<br>
zipWith zipWith - (Char -> Char -> Char) -> Text -> Text -> Text<br>
- zipWith zipWith (Char -> Char -> a) -> Text -> Text -> [a]<br>
<br>
* The -By suffix has been used for predicate versions in 5 cases here,<br>
but not for filter and findIndex.<br></blockquote><div><br></div><div>In the case of filter, that's because a filter function that didn't accept a predicate wouldn't be useful. I added findIndex for completeness back when that was the tack I was taking, but it arguably shouldn't be present at all, since it's subsumed by find.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
* The find function has no connection with findBy. It ought to have a<br>
name that is the plural of the name of the break function.</blockquote><div><br></div><div>Again, this is present for completeness, and makes little obvious sense to retain.</div></div>