test_pattern_rec: Recursive comparison of expression and pattern.

Description Usage Arguments Value

View source: R/cases.R

Description

Recursive comparison of expression and pattern.

Usage

1
test_pattern_rec(escape, expr, test_expr, eval_env, match_env)

Arguments

escape

Continuation from callCC, used to escape if we cannot match.

expr

The expression to match again.

test_expr

The pattern we are trying to match.

eval_env

The environment where we get constructors from.

match_env

The environment to put matched variables in.

Value

An environment containing bound variables from the expression, if matching. If the pattern doesn't match, the function escapes through the escape continuation.


pmatch documentation built on Oct. 19, 2018, 5:04 p.m.