This has no business looking this satisfying
this post was submitted on 16 Feb 2022
40 points (93.5% liked)
Programmer Humor
33322 readers
819 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
Goofy but aesthetically pleasing impl
This isn't goofy, this is an extremely diffused "pattern" when you need to use non dynamic number sequences.
Dynamic programming /s
ghci> φ = (1 + sqrt 5) / 2
ghci> ψ = 1 - φ
ghci> fib n = (φ ** n - ψ ** n) / (sqrt 5)
view more: next ›