Welcome to the CHICKEN Scheme pasting service

with-timeout for misilver added by alaricsp on Wed Jul 13 16:52:09 2016

(use srfi-18)

(define (with-timeout seconds thunk default)
  (let ((thread (make-thread thunk)))
    (thread-start! thread)
    (thread-join! thread seconds default)))

;; returns the value of the thunk or, if it takes more than 'seconds' seconds, the default value instead

;; does not kill the thunk thread!

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which egg provides `string-pad-right'?
Visually impaired? Let me spell it for you (wav file) download WAV