Algebraic Pattern Matching in Join Calculus (Logical Methods in Computer Science, 2008)