.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
Post a Comment