Given several glasses of defined capacities, the purpose of the pouring problem is to obtain a certain volume of water which does not match any of the capacities of the individual glasses. There is a tap from which any quantity of water can be filled, and a sink where glasses can be emptied. Finally, it is possible to pour from one glass into another glass. This playground is inspired by a presentation by Prof. Martin Odersky on Coursera in his “Introduction to Functional Programming in Scala”
This presentation is meant for the curious reader with little or no background at all in OS X, Objective-C or iOS. Swift will be used as a generic language like BASIC or Pascal in the past, used to approach some theorical domain of computer science. The same motivation is driving us today, since a whole domain is returning into the spotlights, unknown even from experienced developers, Functional Programming, although as old as FORTRAN, but being born again with such new representatives as Java 8, Scala, Clojure, or Swift.