i've understood, big thanks for your help !
have a nice day,
-mw
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
On 10/22/10 5:38 PM, scouic wrote:
I thought invalid-xexpr?was necessarily a boolean returning # t or # f ...
thank you very much for your explanation David
exn:invalid-xexpr? is a predicate: it's a function that can be applied
to any value and it will return either #t or #f. It returns #t on
I thought invalid-xexpr? was necessarily a boolean returning # t or # f ...
thank you very much for your explanation David
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
On 10/22/10 5:12 PM, scouic wrote:
Hi,
i learn with-handlers mechanism, and i don't understand what's wrong in
this piece of code ?
#lang racket
(require xml)
(define a-good-string "hi there!")
(define a-bad-string "hi there!")
(define (panoramix s)
(with-handlers ((exn:invalid-xexpr? (lamb
Hi,
i learn with-handlers mechanism, and i don't understand what's wrong in this
piece of code ?
#lang racket
(require xml)
(define a-good-string "hi there!")
(define a-bad-string "hi there!")
(define (panoramix s)
(with-handlers ((exn:invalid-xexpr? (lambda (e) 'UFO)))
(string->xexpr s)))
5 matches
Mail list logo