A scala implementation of functional arrows