Why Nostr? What is Njump?
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
Author Public Key
npub1srmnmfqhw66aayzqn0ldvpjfq0jw0fj8gr9ygq84u4phlp7kpcsqg9dk6q