chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] How to get the kind list of a condition?


From: Vok Vojwo
Subject: [Chicken-users] How to get the kind list of a condition?
Date: Fri, 9 Dec 2011 11:36:34 +0100

Is there a way to get the kind list of a condition without converting
the whole condition into a list?

This example:

(let* ((fail (lambda () (open-input-file "")))
       (exn (call/cc (lambda (return)
                       (with-exception-handler return fail)))))
  (map car (condition->list exn)))

Generates:

(exn i/o file)

But this converts the whole call-chain into a list, which might be
quite expensive. So the question is, if there is a cheaper way to do
the same.

I found get-condition-property to get properties of a specific kind
but no function which returns the kind list.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]