Implement guarded record constructors #1

Open
opened 2026-04-12 19:29:23 +08:00 by BirDt · 0 comments
Owner

;; TODO: define a similar function here for record constructor


Implement a type-guarded record constructor which simplifies the component constructor calls such as:

(define-record-type <line-2d>


The guarded mutator function can be seen as a reference:

(define (guarded-mutator record-type field predicate)

https://git.cyan.sh/BirDt/imugi/src/commit/df700e757be0f87e17dac89557ce03a0ff6c4ac6/engine/guards.scm#L24 Implement a type-guarded record constructor which simplifies the component constructor calls such as: https://git.cyan.sh/BirDt/imugi/src/commit/df700e757be0f87e17dac89557ce03a0ff6c4ac6/engine/components.scm#L325 The guarded mutator function can be seen as a reference: https://git.cyan.sh/BirDt/imugi/src/commit/df700e757be0f87e17dac89557ce03a0ff6c4ac6/engine/guards.scm#L18
BirDt added this to the Core Engine Code Cleanup project 2026-04-12 19:29:23 +08:00
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: BirDt/imugi#1
No description provided.