Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Exceptions/Scheme/exceptions.ss
Normal file
22
Task/Exceptions/Scheme/exceptions.ss
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(define (me-errors xx exception)
|
||||
(if (even? xx)
|
||||
xx
|
||||
(exception)))
|
||||
|
||||
;example that does nothing special on exception
|
||||
(call/cc
|
||||
(lambda (exception)
|
||||
(me-errors 222 exception)
|
||||
(display "I guess everything is alright")))
|
||||
|
||||
;example that laments oddness on exception
|
||||
(call/cc
|
||||
(lambda (all-ok) ;used to "jump" over exception handling
|
||||
|
||||
(call/cc
|
||||
(lambda (exception-handle)
|
||||
(me-errors 333 exception-handle)
|
||||
(display "I guess everything is alright")
|
||||
(all-ok)))
|
||||
|
||||
(display "oh my god it is ODD!")))
|
||||
Loading…
Add table
Add a link
Reference in a new issue