Erlang implementation of spiking neural network