- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
functionalform-清华大学资讯工程系.ppt
* * * * * * * * * * * * * * * * * * * * * * * * * * * Refer to p.78 * * * Refer to p.79 * Refer to p.84 * Refer to p.73 * Refer to p.78, 85 * * * * Refer to p.73, 78 * Refer to p.73, 78 * * * * * EQLI-GEN eqli-gen It takes two general lists; returns whether the two lists are equal (DEFUN eqli-gen (li1 li2) (COND ((ATOM li1) (EQ li1 li2)) ((ATOM li2) nil) ((NULL li1) (NULL li2)) ((NULL li2) nil) ((eqli-gen (CAR li1) (CAR li2)) (eqli-gen (CDR li1) (CDR li2))) (t nil))) Copied and altered from textbook “Concepts of Programming Languages” * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Arithmetic Functions +, -, *, /, ABS, SQRT, MOD, REMAINDER, MIN, MAX expression value 42 42 (+ 5 7) 12 (+ 5 7 8) 20 (- 15 7 2) 6 (- 24 (* 4 3)) 12 Copied and altered from textbook “Concepts of Programming Languages” EVAL, QUOTE EVAL A function that can evaluate any other functions An implementation of EVAL could serve as a LISP interpreter QUOTE It returns the parameter without evaluation QUOTE is required because the interpreter, i.e. EVAL, always evaluates the parameters. QUOTE is used to avoid parameter evaluation when it is not appropriate QUOTE can be abbreviated with the apostrophe prefix operator. (A B) is equivalent to (QUOTE (A B)) Copied and altered from textbook “Concepts of Programming Languages” expression return value (QUOTE A) A ‘A A ‘(A B C) (A B C) (CAR (A B C)) error (CAR ‘(A B C)) A (CAR (+ 5 7)) error (CAR ‘(+ 5 7)) + Copied and altered from textbook “Concepts of Programming Languages” List Functions: CAR, CDR CAR takes a list parameter; returns the first element of that list e.g., (CAR (A B C)) yields A (CAR ((A B) C D)) yields (A B) CDR takes a list parameter; returns the list after removing its first element e.g. (CDR (A B C)) yields (B C) (CDR ((A B) C D)) yields (C D) Copied and altered from textbook “Concepts of Programming Languages” The nami
您可能关注的文档
- 2018华南国际工业自动化展览会招展手册.PDF
- 2018年度募集资金使用情况的专项核查意见-嘉事堂.PDF
- 2018年度股东大会的法律意见书-嘉事堂.PDF
- 2018年省级质量工程项目申报指南-安徽农业大学经济技术学院.doc
- 2018年第114期《体育学院举办第五届大学生趣味运动会》.-邯郸学院.doc
- 2018版信息安全专业本科人才培养方案-湖北大学计算机与信息工程.PDF
- 20190002-信管中心服务器负载均衡设备和安全防护系统-淮阴工学院.doc
- 2019年辽宁省职业院校技能大赛(高职组)集成电路开发及应用赛项.doc
- 2019春节特刊《保健食品研发与产业化》系列之一-PanSci泛科学.PDF
- 2上下文感知的探索式服务组合方法-OpenRepositoryofNational.doc
原创力文档


文档评论(0)