What is Nostr?
Grigory Shepelev /
npub1srm…dk6q
2023-09-13 19:36:45

Grigory Shepelev on Nostr: Question for #scheme ☯️ kings & queens 👑 ! Are there an alternative to ...

Question for #scheme ☯️ kings & queens 👑 ! Are there an alternative to clojure's alter-var-root https://clojuredocs.org/clojure.core/with-redefs in scheme?

Imagine I have a module `(X)` with `(define a 1) (define-public (f x) (+ x a))` and module `(Y)` that has `#:use-module (X)`. In `(Y)` want to alter a from `(X)` in a way that would also affect `f`. Example: (being in module `(Y)`): `(alter! a 2) (equal? (f 3) 5) => #t`

CC npub1cwwjvpgyj5fy8tdkw4d62zsym74eaqs4y7wt0c6nzt5a7lll9x2qvpny8k (npub1cww…ny8k) npub1f3srhzp5z8qwchfdyy6kceysfg9jzxr937ttracqrxuxuncc25mqgmjzfc (npub1f3s…jzfc) npub1gcht7nxyny85r6ezenuyp3f8ey73l773d0glpgeacudx6r5evh2szu00vs (npub1gch…00vs)
Author Public Key
npub1srmnmfqhw66aayzqn0ldvpjfq0jw0fj8gr9ygq84u4phlp7kpcsqg9dk6q