►
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
Operator Precedence
2.5
Brands
2.6
Type Checking
2.7
Spies
On this page:
Brand
brander
.brand
.test
← prev
up
next →
2.5
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.
← prev
up
next →