Bridgewater Associates interview question

Functions at work