Near the top of the article:
>While the base algorithm is very simple, the point of the exercise is that the interviewer will add new rules to test how you update the code while keeping it readable and maintainable.
As for this:
>His code could handle new rules without a problem, so extensibility was not a problem either.
Ok, now I want you to query a database at runtime and write the output to a file instead if the number is in the database. Good luck with adapting this type-theory solution, and good luck with debugging this crap. It's a PhD-level solution to a freshman-level problem, that is very atypical and uses niche features of the language that might fail unexpectedly due to language limitations.
On top of all of that, the story sounds like fiction as well. But who knows.