The bind object itself doesn't do anything. It simply exists in order to define notation for binding variables using the sub-script operator.

# S3 method for pmatch_bind
[(dummy, ...) <- value

Arguments

dummy

The bind object. Only used to dispatch to the right subscript operator.

...

Patterns to assign to.

value

Actual values to assign

Examples

bind[x, y] <- c(2,4) x == 2
#> [1] TRUE
y == 4
#> [1] TRUE
llist := NIL | CONS(car, cdr : llist) L <- CONS(1, CONS(2, CONS(3, NIL))) bind[CONS(first, CONS(second, rest))] <- L first == 1
#> [1] TRUE
second == 2
#> [1] TRUE