Rholang Lesson 11: Pattern Matching

Derek Beres
May 23 · 6 min read

About Patterns

The match construct

Two cases we’ve seen

Syntactic sugar

if (cond) {
// Do Process P
}
else {
// Do Process Q
}
match cond {
true => // Do Process P
false => // Do Process Q
}

Exercise

A Nicer Greeter

Exercise

Advanced pattern matching

Unions and Intersections

Exercise

More About Bundles

Exercise

RChain Cooperative

Secure. Sustainable. Scalable. Blockchain solution.

Derek Beres

Written by

Director of Content @ RChain Cooperative. GFI @ Equinox. Author. Podcaster. Professional Cat Herder. http://www.derekberes.com.

RChain Cooperative

Secure. Sustainable. Scalable. Blockchain solution.