Quote-unquote "macros"

from blog Ian Henry, | ↗ original
You’ve probably seen this Python 101 thing before: @memoized def fib(n): if n 1: return n return fib(n - 1) + fib(n - 2) Leaving aside the absurdity of computing Fibonacci numbers recursively, it’s a common first introduction to Python decorators and higher-order functions. fib is just a function, and memoized takes that function and returns a...