Add sort function for slists
Merge pull request #586 from sigurdteigen/master

Sort function