![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
CS UW course
文章平均质量分 68
UW 课程知识点梳理
Codee Xing
这个作者很懒,什么都没留下…
展开
-
CS 135 M10 struct结构体
先要声明这个类型 define-struct声明的时候需要加注释:(define-struct inventory (desc price available));; an Inventory is a (make-inventory Str Num Nat);; Requires: price >= 0建立这个类型的变量访问struct中的某个分量声明结构体之后一些基本的功能。quoting更简洁的形式的list...原创 2021-10-27 14:14:10 · 148 阅读 · 0 评论 -
Cs 135 recursive & functions as parameter
simple recursionaccumulative recursionAccumulative Recursionnote: (first lon) is nether unchanged nor one step closer to the base. So it belongs to accumulative recursion.IndicatorsIt usually needs wrapper function to separate variables , like (m.原创 2021-10-19 17:09:10 · 228 阅读 · 0 评论 -
CS 135Dr Racket_List
List;;基本定义方法(define concert (cons "Da" (cons "xiao" empty)))相关的函数原创 2021-09-22 22:30:53 · 144 阅读 · 0 评论 -
Waterloo CS135 DrRacket
Functions (第二课时)Racket 语言Racket被用于脚本程序设计、通用程序设计、计算机科学教育和学术研究等不同领域。(define (add-twice a b) (+ a (* 2 b))). [函数名 形参 运算规则](define (huh? x) (+ x 2))a函数用在b函数的里面,a函数的定义写在后面。定义constant写在前面。argument: (f 2 3). 指真实去算的数2 3parameter: (f x y) 指形参一些函数的用法:>原创 2021-09-12 11:44:19 · 158 阅读 · 0 评论