Created
January 19, 2013 03:04
-
-
Save dsummersl/4570511 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fn = { 'cmpstr': a:1 } | |
function fn.compare(x,y) dict | |
let a = a:x | |
let b = a:y | |
exec "return ". self.cmpstr | |
endfunction | |
return sort(a:list,fn.compare,fn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment