A scala language version of a nodal system