Whiteboard exercise written as an R program

Whiteboard exercise written as an R program