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
2 files
+ 16
14
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
4
@@ -1860,13 +1860,13 @@ appear more than once in the fields section.
@end deffn
@subsection Applicable structs
@subsection Applicable records
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
@emph{applicable records}. The @code{<applicable-reord>} record type
defines a single field that should contain a procedure. Any record
type that descends from the @code{<applicable-record>} lineage (via
@emph{applicable records}. The @code{<applicable-reord>} type defines
a single field that should contain a procedure. Any record type that
descends from the @code{<applicable-record>} lineage (via
@code{#:parent}) becomes procedure-like.
As a contrived example, an incrementing counter could be implemented
Loading