News for hackers. Stuff that matters.
Re:Lambdasort: Quicksort written in Python only using lambdas by dunham on Tuesday January 02, 2024 @07:37PM (#38849194)
A couple of months ago I was playing around with a similar technique, Mogensen-Scott encoding, in typescript. I was mainly interested in it as a way to express sum types without a bunch of if statements (instead a "value" of a type takes functions for each possible case branch and calls the appropriate one).

I ended up writing a little dependent type checker:

https://gist.github.com/dunhamsteve/1be0cbb346d75ee1be8f67d1...

Re:Lambdasort: Quicksort written in Python only using lambdas by lucasoshiro on Wednesday January 03, 2024 @05:47PM (#38860894)
Wow, I didn't know about that. Nice to see more things about lambda calculus, I think it is the most beautiful thing in computer science, but I haven't studied it too deeply as I need to prioritize other things...