►
Pyret
1
Getting Started
2
Language Concepts
3
Builtins and Libraries
4
Pyret Style Guide
5
Internals
6
Glossary
▼
2
Language Concepts
2.1
Language Constructs
2.2
Testing
2.3
equality
2.4
Combining Multiple Operators
2.5
Modules
2.6
Use
2.7
Brands
2.8
Type Checking
2.9
Spies
On this page:
Brand
brander
.brand
.test
contents
← prev
up
next →
2.7
Brands
Usage:
include brands
import brands as ...
Brand
<a>
Brands are a mostly internal language concept, useful for implementing custom datatypes.
brander
::
(
)
->
Brand
<
a
>
Creates a new brand.
.brand
::
(
arg
::
Any
)
->
a
Produce a copy of the value with this brand.
.test
::
(
arg
::
Any
)
->
Boolean
Test if the value has this brand.
contents
← prev
up
next →