Steve Schafer wrote:
> I have a list of text strings:
>
> ["Alice", "Bob", "Cindy", "Bob", "Bob", "Dave", "Cindy"]
>
> As you can see, some of the strings occur only once; others appear two
> or more times.
>
> I would like to end up with a new list, according to the following
> rules:
>
> 1)
On Thu, 02 Nov 2006 12:20:55 -0800, you wrote:
>It seems you only need a table of counts of the number of times
>the string has occurred previously, which you can have available
>on the first pass.
>
>e.g,
>import Data.List
>import Data.Map as Map
>mark strings = snd $ mapAccumL
>(\counts str ->
>
Steve Schafer wrote:
I have a list of text strings:
["Alice", "Bob", "Cindy", "Bob", "Bob", "Dave", "Cindy"]
As you can see, some of the strings occur only once; others appear two
or more times.
I would like to end up with a new list, according to the following
rules:
1) If a string occurs o
I have a list of text strings:
["Alice", "Bob", "Cindy", "Bob", "Bob", "Dave", "Cindy"]
As you can see, some of the strings occur only once; others appear two
or more times.
I would like to end up with a new list, according to the following
rules:
1) If a string occurs only once in the origina