A toy neural network implementation in Scala