Fix pattern-matching on functions.
Merge pull request #110 from folone/master

Fix pattern-matching on functions.