3 ms·
this is a very funny way to do this, thanks! i was thinking of using the (deprecated but still widely supported(?)) `caller` property but was sad that it wouldn
by ianthehenry 2y ago
this is a very funny way to do this, thanks! i was thinking of using the (deprecated but still widely supported(?)) `caller` property but was sad that it wouldn't admit multiple memoization dictionaries per calling function (also wouldn't work at the top-level but, like, who cares). but using the stack trace is great.
i mean, you know, this isn't really... this isn't really a thing that you would ever want to do, but i am glad that life found a way
- kragen 2y agoit might be; you'd have to benchmark it to be sure