Ask HN: What piece of code/codebase blew your mind when you saw it?


W3Schools
Ask HN: What piece of code/codebase blew your mind when you saw it?
by Decabytes on Hacker News.
Mine was when I learned a subset of recursion called mutual recursion. It was for a pair of function to determine if a number was odd or even. (define (odd? x) (cond

[(zero? x) #f]

[else (even? (sub1 x))]))

(define (even? x) (cond

[(zero? x) #t]

[else (odd? (sub1 x))]))


W3Schools

Leave a comment