What is Nostr?
Gene Pasquet /
npub1fe5…k58h
2024-10-28 22:59:15

Gene Pasquet on Nostr: Is there a way with #guile #scheme to create a new record from an existing one and ...

Is there a way with #guile #scheme to create a new record from an existing one and only change a few properties? Something like:

```
(define-record-type <snake>
(make-snake gender length color)
snake?
(gender snake-gender)
(length snake-length)
(color snake-color))

(define a (make-snake 'female 100 'brown))
(define b (derive a :length 50 :color 'green)) ; <= this here
```

#guilescheme
Author Public Key
npub1fe54j85xa8xmew9n4cma4xc2ksayg64teprzd9xfcej6et6wltrsclk58h