snake in scala