-- Leo's gemini proxy
-- Connecting to idiomdrottning.org:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini; lang=en
Here is an generic slice multimethod for Scheme.
(slice '(hello now there you are) 1 3)
⇒ (now there)
(slice "so this is where you are hiding" 3 7)
⇒ (#\t #\h #\i #\s)
(let ((str "so this is where you are hiding")) (set! (slice str 3 7) "that") str)
⇒ “so that is where you are hiding”
(slice 1243153 -3 -0)
⇒ (1 5 3)
Because of Scheme’s call-by-value semantics, set! doesn’t work on numbers♥︎
This is just a functional wrapper on call-list, call-vector and call-string from earlier today.
-- Response ended
-- Page fetched on Tue Apr 23 08:25:05 2024