Jane Street Interview Question

Difficult functional programming questions.