Pattern matching blocks as values