refactor parseMany function to accept general functions rather than strings, this is done in order to handle -> as an identifier rather than its own token