Post History
JavaScript, 25 bytes Arguments are curried, i.e. f(a)(s), where a is the array to be sorted and s is an array of functions to sort by, in reverse order. Modifies a in place, which I don't know tha...
Answer
#1: Initial revision
# JavaScript, 25 bytes Arguments are curried, i.e. `f(a)(s)`, where `a` is the array to be sorted and `s` is an array of functions to sort by, in reverse order. Modifies `a` in place, which I don't know that we have a consensus on here yet - if it's not permitted then add `&&a` to the end to return the sorted array. <!-- language-all: lang-javascript --> a=>s=>s.map(g=>a.sort(g)) [Try it online!](https://tio.run/##fVJbb4IwFH7nV5i@jCZIhr6Z4TKX7MFt@sDDVGJCwQpVBNM2U1z87ayUW2dwCWlyvss5p1/ZoW/EAkqOvJ@kG5xv7RzZYyY@84COemiPkclSyvUQwjxBB8xsF7xGlDBOEtSbplHC0gQYwOH4hOimA/mKCMdKPX@YUIJUhXMgPBL1hMRxUxSNlG7TYnZDOiiOM4VtN/rEGaashtqyntUAcli7ywoFEaJZM6G0T2h6UtlW/@L7uFXXfNNdbl@7y21vtTfbVzmttSLumbitrSPDNwiUT3CMCfd6nkvWT75aPfetkSUtb4QyLj3CUfeQLR6hFHygO7wFta0u3xbqbtPKqD1rqAWp2DTGZpyG@tSZz0zGKUlCss0qH9S01N/hgIvf4wecwcgyQAZGAwNcxHk1JDZUsGGFDTqw0mvd1Vl/dPex4bUM8x1nZZb7Ikt3LyIUR5vcQk1FiKXWO3tlbMtONqvYVSd78YpIq0SqUFcy0KU8F/9nWhth/gs)