摘要: (let ((var expr) ...) body1 body2 ...)(letrec ((var expr) ...) body1 body2 ...)Like let, the letrec syntactic form includes a set of variable-value pairs, along with a sequence of expressions referred to as the body of the letrec.Unlike let, the variables var ... are visible not only within the body 阅读全文
posted @ 2013-02-26 13:34 NiJc 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 1 > (cons 1 3) 2 (1 . 3) 3 > (car (cons 1 3)) 4 1 5 > (pair? (cons 1 3)) 6 #t 7 > (cdr (cons 1 3)) 8 3 9 > (list? (cons 1 3))10 #f11 > (pair? '())12 #f13 > (list? '())14 #t 阅读全文
posted @ 2013-02-26 11:59 NiJc 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1 #第一种 2 (define sero? 3 (lambda (l) 4 (cond 5 ((null? l))))) 6 7 > (sero? '(() ())) 8 > 9 10 > (sero? '())11 #t12 13 #第二种14 (define sero?15 (lambda (l)16 (cond17 (null? l))))18 19 > (sero? '())20 ()21 22 #第三种23 (define sero?24 (lambda (l)25 (null? l)))26 27 > (sero?... 阅读全文
posted @ 2013-01-23 11:28 NiJc 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 1 (define tst2 (lambda (l)3 (cond4 (null? l))))> (tst '())()1 (define tst2 (lambda (l)3 (cond4 ((null? l)))))> (tst '())#t1 (define tst2 (lambda (l)3 (cond4 ((null? l) #t)5 (else #f))))> (tst '())#t> (tst '(a))#f 阅读全文
posted @ 2013-01-20 09:58 NiJc 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1. location: windows -> 自己用户名文件夹 (_vimrc); linux -> /home/yourname/.vimrc (自己创建这个文件)2. my config:linux:" Turn on line numbering. Turn it off with "set nonu" set nu " Set syntax onsyntax on" Indent automatically depending on filetypefiletype indent onset autoindent" 阅读全文
posted @ 2013-01-18 09:19 NiJc 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 1. StartStatistic tool R can be downloaded athttp://www.r-project.org/Other resources aboutApplied Linear Regression, 3rd Ed.can be found athttp://www.stat.umn.edu/alr/R.htmlAfter installing R, implementingView Code > install.packages("alr3", dependencies=TRUE)to install "alr3" 阅读全文
posted @ 2013-01-16 13:37 NiJc 阅读(111) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #include <stdio.h> 2 #include <string.h> 3 int distance(char str1[]) 4 { 5 int len; 6 len=strlen(str1); 7 return len; 8 } 9 int main()10 {11 char str[2][10]; // if str[2][7]12 int i;13 for(i=0;i<2;i++)14 scanf("%s", str[i]);15 int len1, len2;16 len1 = distance(st 阅读全文
posted @ 2013-01-16 02:15 NiJc 阅读(98) 评论(0) 推荐(0) 编辑