Renamed List.foreach to foreachDoEffect to support lambdas