Added pattern-matching.

Added slurpfile functions.

TODO
[ ] rewrite permute function to accept arrays