My initial gut-reaction way of doing this is:
```elm

> import List> import String> unorderedList = [ "c", "B", "a" ]["c","B","a"] : 
> List String> orderedList = unorderedList |> List.sortBy 
> String.toUpper["a","B","c"] : List String

```

Not terribly efficient, but easy to read, short, and descriptive.  :-)


On Friday, September 9, 2016 at 9:45:01 AM UTC-6, Rudolf Bargholz wrote:
>
> Hi,
>
> Failing here dismally, so I hope someone here is kind enough to help out.
>
> *Problem*: I have a list of strings and want to sort the list independant 
> of the case of the chars in the string
>
> What I have so far:
>
> > import List
> > import String
> > unorderedList = [ "c", "B" , "a"]
> ["c","B","a"] : List String
> > orderedList = List.sort unorderedList
> ["B","a","c"] : List String
> > orderedList2 = unorderedList |> List.map String.toUpper |> List.sort
> ["A","B","C"] : List String
>
>
> What I am trying to acheive is the following result:
>
> ["a","B","c"] : List String
>
> I must be overlooking something easy. 
>
> Could anyone point me in the right direction how I can accomplish this?
> Is there any resource that has numerous Elm examples on how to use 
> *List.sort*, *List.sortBy* and *List.sortWith*?
>
> Regards
>
> Rudolf Bargholz
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to