Dana. The interviewer. Friendly, efficient. She leans forward.
“So,” she says, “walk me through FizzBuzz.”
You could do this in your sleep. “Is JavaScript okay?”
She nods.
You open your laptop and begin.
let S = ( x ) => ( y ) => ( z ) => x ( z )( y ( z )); let K = ( x ) => ( y ) => x ;
“That should do it,” you say to yourself. “Just need to combine these a few times.”
Dana raises an eyebrow. You continue.
let I = S ( K )( K ); // x => x let B = S ( K ( S ))( K ); // x => y => z => x(y(z)) let C = S ( B ( B )( S ))( K ( K )); // x => y => z => x(z)(y) let W = S ( S )( K ( I )); // x => y => x(y)(y) let T = C ( I ); // x => y => y(x)
Bluebird, cardinal, warbler, thrush. Avian friends you know well.
... continue reading