.net - OrderBy ThenBy in F# -


Is there a function in the F # similar to the LINQ fluent syntax to sort by multiple functions:

  MyList.OrderBy (funny x-> x.Something). Then (funny x-> x.SomethingElse)  

I like something like this:

  myList | & Gt; Seq.sort_by (fun x-> x.Something). & Gt; Seq.then_by (Fun x-> x.SomethingElse)  

Thx

Use a tuple as your sort key:

  myList | & Gt; Seq.sortBy (fun x -> x.Something, x.SomethingElse)  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -