DennisMitchell / jellylanguage

Jelly is a recreational programming language inspired by J.
MIT License
865 stars 45 forks source link

Add a sort-by hyper #10

Closed lynn closed 8 years ago

lynn commented 8 years ago

Þ takes a link f and returns a new monadic link that performs a stable sort using monadic application of f as key. For example, sorts a list by length (ascending):

“this is a new sorting hyper”ṣ⁶LÞj⁶

prints

a is new this hyper sorting
lynn commented 8 years ago

Dennis said:

Speaking of quicks, I'll take a look at your sort-by later. I want to turn it into a quick and let it take niladic and dyadic links as well.