Scheme Procedure: dynamic-wind in_guard thunk out_guard
来源:互联网 发布:神仙劫元神进阶数据 编辑:程序博客网 时间:2024/06/08 13:43
If, any time during the execution of thunk, the dynamic extent of the dynamic-wind
expression is escaped non-locally, out_guard is called. If the dynamic extent of the dynamic-wind is re-entered, in_guard is called. Thus in_guard and out_guard may be called any number of times.
(define x 'normal-binding) => x (define a-cont (call-with-current-continuation (lambda (escape) (let ((old-x x)) (dynamic-wind ;; in-guard: ;; (lambda () (set! x 'special-binding)) ;; thunk ;; (lambda () (display x) (newline) (call-with-current-continuation escape) (display x) (newline) x) ;; out-guard: ;; (lambda () (set! x old-x))))))) ;; Prints: special-binding ;; Evaluates to: => a-cont x => normal-binding (a-cont #f) ;; Prints: special-binding ;; Evaluates to: => a-cont ;; the value of the (define a-cont...) x => normal-binding a-cont => special-binding
- Scheme Procedure: dynamic-wind in_guard thunk out_guard
- thunk
- THUNK
- Thunk
- Wind
- Thunk,thunk,thunk
- Dynamic 'Sales by Week' Procedure in SQL Server
- Oracle/PLSQL: Procedure that outputs a dynamic PLSQL cursor
- MySQL Stored Procedure Prepared Statement (Dynamic SQL) Parameterized
- MySQL Stored Procedure Prepared Statement (Dynamic SQL) Parameterized
- procedure
- procedure
- procedure
- procedure
- procedure
- procedure
- PROCEDURE
- procedure
- 『系统管理』Linux如何建立FTP(ProFTP的设置)
- 『系统管理』VI使用手册
- 『系统管理』AIX 常用命令汇总
- UBUNTU下配置PHP
- soaptools
- Scheme Procedure: dynamic-wind in_guard thunk out_guard
- 基于Sphinx+MySQL的千万级数据全文检索(搜索引擎)架构设计
- 『管理调优』找出全表(索引)扫描SQL
- 『锁和进程』Oracle的死锁
- 『锁和进程』:根据系统进程号查对应的Session ID
- 『管理调优』使用数据连接出现ORA-02085
- 『文件管理』在数据库打开时对非系统表空间的数据文件改名
- 『管理调优』如何确定一个回滚段被哪个用户使用
- 『管理调优』如何有效的删除一个大表(extent数很多的表)