subset-.pmatch_bind: Bind variables to pattern-matched expressions.

Description Usage Arguments Examples

Description

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

Usage

1
2
## S3 replacement method for class '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

1
2
3
4
5
6
7
8
9
bind[x, y] <- c(2,4)
x == 2
y == 4

llist := NIL | CONS(car, cdr : llist)
L <- CONS(1, CONS(2, CONS(3, NIL)))
bind[CONS(first, CONS(second, rest))] <- L
first == 1
second == 2

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