From the back of the book:
The author, Angus Croll is an Engineer at Twitter, and he co-authored the Flight framework that Twitter uses. This book is actually based on a blog post that he wrote back in 2012. So I knew going into this that he definitely had an idea what he wrote about, and that he had some time to really hone what he thought the functions written by each author would really look like.
I really liked how Croll broke the book into different parts, and within each part having five authors write the same function. It allows for readers to realize how differently each person can get to the same answer, with none of the functions appearing at all similar. It also provides a lot of variety, as reading the same(ish?) function for 25 authors would’ve gotten boring.
Croll’s broken the book down in this way:
- Fibonacci, where the created function returns numbers in the Fibonacci sequence (with functions written by Ernest Hemingway, William Shakespeare, André Breton, Roberto Bolaño and Dan Brown)
- Factorial, where the function returns the factorial of a number supplied (with functions by Jack Kerouac, Jane Austen, Samuel Johnson, Sir Arthur Conan Doyle and James Joyce)
- Happy Numbers, where the function determines if the number supplied is a happy number (with functions by J.D. Salinger, Tupac Shakur, Virginia Woolf, Geoffrey Chaucer and Vladimir Nabokov)
- Prime Numbers, which returns a list of prime numbers (with functions by Jorge Luis Borges, Lewis Carroll, Douglas Adams, Charles Dickens and David Foster Wallace)
- Say It, which is a chainable function that accepts one word per function call until it is called without an argument, and then returns all of the words previously passed to it in order (with functions by Sylvia Plath, Italo Calvino, J.K. Rowling, Arundhati Roy and Franz Kafka)
The Bottom Line