Code snippet for Referential Transparency and Substitution Model