原创 8 Input and Output
8 Input and Output Racket port 表示數據的源或匯,諸如文件,終端,TCP連接或內存中的字符串。 端口提供順序訪問,其中數據可以被讀取或寫入一段時間,而不需要一次性地消耗或產生數據。 更具體地,輸入端口
原创 21 Running and Creating Executables
21 Running and Creating Executables
原创 框架 練習 2.46 2.47
#lang racket ;: 練習 2.46 (define (make-vect x y) (cons x y)) (define (xcor-vect vect) (car vect)) (define (yc
原创 ScopeGuard : 安全清理資源
轉載自(http://www.cnblogs.com/tonychen-tobeTopCoder/p/5222178.html class ScopeGuard { public: explicit ScopeGuard(
原创 練習2.24 2.26
#| (define x (cons (list 1 2) (list 3 4))) (length x) (define (count-leaves tree) (cond ((null? tree) 0)
原创 2 Racket 要點
本部分提供一個快速的介紹,關於本嚮導的後面剖分,作爲Racket的背景知只, 有)) Ra cket經驗的可以直接跳到內建數據類型 2.1 Simple Values Racket值包括數字,布爾,字符串和字節字符串.在DrRa
原创 練習3.1
#lang racket (define (make-accumulator init-value) (define total init-value) (lambda (amount) (begin (set!
原创 《代碼之髓》
大概看了一遍。
原创 10.1 Multiple Values
原文 (values v ...) → any v : any/c >(values 1) 1 >(values 1 2 3) 1 1 3 (call-with-values generator receiver) → any