Imagine that you have a module already written by someone that does the job you want to, but there is only one variable (example `(define pi 3.14)` ) that you want just override but otherwise would like everything to work as previously. Wouldn't like to copy-paste a one of code
@rml@wingo@cwebber@monkey1 probably the answer given was toatally correct. set! and stuff will work in repl, but won't when launched in the testing env that I just set up.
it won't update setted variable's value in all procedures of `(X)` that uses `x`. `(define (square r pi) (* r r pi))` <-- here pi will stay 3.14 when `square` will be called from `(Y)`
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`
mostly clojure(+script) developer*, enthusiast of functional programming, lisps (guile scheme) and reproducible builds (Guix), some DIYinterested in developer interface and experience (as a part of UI/UX)*[currently working with typescript+node 🙁]#lisp #clojure #guile #scheme #guix #linux