Welcome to the CHICKEN Scheme pasting service

Minimal non-working error catch example added by zilti on Fri Oct 14 14:31:02 2022

(import (chicken condition)
        (srfi 19))

(define (try-pattern input pattern)
    (call/cc
        (lambda (k)
            (with-exception-handler (lambda (x) (k #f))
                                    (string->date input pattern)))))

(define (parse-timestamp timestamp)
    (or (try-pattern timestamp "~H:~M:~S")
        (try-pattern timestamp "~Y-~m-~e")
        (try-pattern timestamp "~Y-~m-~e ~H:~M:~S")))
        
(parse-timestamp "2022-10-14")

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which R5RS procedure returns `'(2 3)' when given `'(1 2 3)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV