-- Leo's gemini proxy

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

-- Connected

-- Sending request

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

preserve


preserve is a combinator that caches the result of a procedure for a given number of seconds.


Example


(define slow-plus (preserve 5 +))

(list (slow-plus 1 2) (slow-plus 3 4))

This returns (3 3). Calling (slow-plus 3 4) five seconds later returns 7.


Code


sudo chicken-install preserve

For a repo,


git clone https://idiomdrottning.org/preserve

-- Response ended

-- Page fetched on Fri May 17 09:38:55 2024