-- Leo's gemini proxy

-- Connecting to idiomdrottning.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

Can you slice it, Artoo?


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.


call-vector and call-string

-- Response ended

-- Page fetched on Sun Aug 1 00:55:14 2021