more AgdaSort
scala syntax