A simple stock management system in the functional core; imperative shell style