Mechanisms For Handling Sequences With Neural Networks