Skip to content

Instantly share code, notes, and snippets.

@PatrickMcDonald
Created September 10, 2014 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatrickMcDonald/6f1f3c6725c204bd41cd to your computer and use it in GitHub Desktop.
Save PatrickMcDonald/6f1f3c6725c204bd41cd to your computer and use it in GitHub Desktop.
[<CompiledName("SortByDescending")>]
let sortByDescending keyf source =
checkNonNull "source" source
mkDelayedSeq (fun () ->
let keyf = System.Func<_,_>(keyf)
let res = System.Linq.Enumerable.OrderByDescending(source, keyf)
res :> seq<_>)
[<CompiledName("SortDescending")>]
let sortDescending source =
checkNonNull "source" source
mkDelayedSeq (fun () ->
let keyf = System.Func<_,_>(id)
let res = System.Linq.Enumerable.OrderByDescending(source, keyf)
res :> seq<_>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment