Skip to content
Snippets Groups Projects

Add applicable records

Merged David Thompson requested to merge applicable-structs into main
1 unresolved thread
Compare and Show latest version
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -1860,13 +1860,13 @@ appear more than once in the fields section.
@@ -1860,13 +1860,13 @@ appear more than once in the fields section.
@end deffn
@end deffn
@subsection Applicable structs
@subsection Applicable records
Hoot's record type system can be used to create new types that can be
Hoot's record type system can be used to create new types that can be
applied as if they were regular procedures. These are known as
applied as if they were regular procedures. These are known as
@emph{applicable records}. The @code{<applicable-reord>} record type
@emph{applicable records}. The @code{<applicable-reord>} type defines
defines a single field that should contain a procedure. Any record
a single field that should contain a procedure. Any record type that
type that descends from the @code{<applicable-record>} lineage (via
descends from the @code{<applicable-record>} lineage (via
@code{#:parent}) becomes procedure-like.
@code{#:parent}) becomes procedure-like.
As a contrived example, an incrementing counter could be implemented
As a contrived example, an incrementing counter could be implemented
Loading