在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 《Scheme R6RS》

《Scheme R6RS》

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:0.82M
  • 下载次数:3
  • 浏览次数:34
  • 发布时间:2023-01-16
  • 实例类别:一般编程问题
  • 发 布 人:老刘
  • 文件格式:.pdf
  • 所需积分:0
 相关标签:

实例介绍

【实例简介】《Scheme R6RS》

【实例截图】

【核心代码】

CONTENTS
Introduction . . . . . . . . . . . . . . . . . . . . . . 3
Description of the language
1 Overview of Scheme . . . . . . . . . . . . . . . . . 5
1.1 Basic types . . . . . . . . . . . . . . . . . . 5
1.2 Expressions . . . . . . . . . . . . . . . . . . 6
1.3 Variables and binding . . . . . . . . . . . . 6
1.4 Definitions . . . . . . . . . . . . . . . . . . . 6
1.5 Forms . . . . . . . . . . . . . . . . . . . . . 7
1.6 Procedures . . . . . . . . . . . . . . . . . . 7
1.7 Procedure calls and syntactic keywords . . . 7
1.8 Assignment . . . . . . . . . . . . . . . . . . 7
1.9 Derived forms and macros . . . . . . . . . . 8
1.10 Syntactic data and datum values . . . . . . 8
1.11 Continuations . . . . . . . . . . . . . . . . . 8
1.12 Libraries . . . . . . . . . . . . . . . . . . . . 9
1.13 Top-level programs . . . . . . . . . . . . . . 9
2 Requirement levels . . . . . . . . . . . . . . . . . 9
3 Numbers . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Numerical tower . . . . . . . . . . . . . . . 10
3.2 Exactness . . . . . . . . . . . . . . . . . . . 10
3.3 Fixnums and flonums . . . . . . . . . . . . . 10
3.4 Implementation requirements . . . . . . . . 10
3.5 Infinities and NaNs . . . . . . . . . . . . . . 11
3.6 Distinguished -0.0 . . . . . . . . . . . . . . 11
4 Lexical syntax and datum syntax . . . . . . . . . 11
4.1 Notation . . . . . . . . . . . . . . . . . . . . 12
4.2 Lexical syntax . . . . . . . . . . . . . . . . . 12
4.3 Datum syntax . . . . . . . . . . . . . . . . . 16
5 Semantic concepts . . . . . . . . . . . . . . . . . . 17
5.1 Programs and libraries . . . . . . . . . . . . 17
5.2 Variables, keywords, and regions . . . . . . 17
5.3 Exceptional situations . . . . . . . . . . . . 18
5.4 Argument checking . . . . . . . . . . . . . . 18
5.5 Syntax violations . . . . . . . . . . . . . . . 19
5.6 Safety . . . . . . . . . . . . . . . . . . . . . 19
5.7 Boolean values . . . . . . . . . . . . . . . . 19
5.8 Multiple return values . . . . . . . . . . . . 19
5.9 Unspecified behavior . . . . . . . . . . . . . 20
5.10 Storage model . . . . . . . . . . . . . . . . . 20
5.11 Proper tail recursion . . . . . . . . . . . . . 20
5.12 Dynamic extent and the dynamic environment 20
6 Entry format . . . . . . . . . . . . . . . . . . . . . 20
6.1 Syntax entries . . . . . . . . . . . . . . . . . 21
6.2 Procedure entries . . . . . . . . . . . . . . . 21
6.3 Implementation responsibilities . . . . . . . 22
6.4 Other kinds of entries . . . . . . . . . . . . 22
6.5 Equivalent entries . . . . . . . . . . . . . . . 22
6.6 Evaluation examples . . . . . . . . . . . . . 22
6.7 Naming conventions . . . . . . . . . . . . . 23
7 Libraries . . . . . . . . . . . . . . . . . . . . . . . 23
7.1 Library form . . . . . . . . . . . . . . . . . 23
7.2 Import and export levels . . . . . . . . . . . 25
7.3 Examples . . . . . . . . . . . . . . . . . . . 26
8 Top-level programs . . . . . . . . . . . . . . . . . 27
8.1 Top-level program syntax . . . . . . . . . . 27
8.2 Top-level program semantics . . . . . . . . . 28
9 Primitive syntax . . . . . . . . . . . . . . . . . . . 28
9.1 Primitive expression types . . . . . . . . . . 28
9.2 Macros . . . . . . . . . . . . . . . . . . . . . 29
10 Expansion process . . . . . . . . . . . . . . . . . . 29
11 Base library . . . . . . . . . . . . . . . . . . . . . 31
11.1 Base types . . . . . . . . . . . . . . . . . . . 31
11.2 Definitions . . . . . . . . . . . . . . . . . . . 31
11.3 Bodies . . . . . . . . . . . . . . . . . . . . . 32
11.4 Expressions . . . . . . . . . . . . . . . . . . 32
11.5 Equivalence predicates . . . . . . . . . . . . 37
11.6 Procedure predicate . . . . . . . . . . . . . 39
11.7 Arithmetic . . . . . . . . . . . . . . . . . . . 39
11.8 Booleans . . . . . . . . . . . . . . . . . . . . 47
11.9 Pairs and lists . . . . . . . . . . . . . . . . . 47
11.10Symbols . . . . . . . . . . . . . . . . . . . . 49
11.11Characters . . . . . . . . . . . . . . . . . . . 50
11.12Strings . . . . . . . . . . . . . . . . . . . . . 50
11.13Vectors . . . . . . . . . . . . . . . . . . . . 51
11.14Errors and violations . . . . . . . . . . . . . 52
11.15Control features . . . . . . . . . . . . . . . . 53
11.16Iteration . . . . . . . . . . . . . . . . . . . . 55
11.17Quasiquotation . . . . . . . . . . . . . . . . 55
11.18Binding constructs for syntactic keywords . 56
11.19Macro transformers . . . . . . . . . . . . . . 57
11.20Tail calls and tail contexts . . . . . . . . . . 59
Appendices
A Formal semantics . . . . . . . . . . . . . . . . . . 61
A.1 Background . . . . . . . . . . . . . . . . . . 61
A.2 Grammar . . . . . . . . . . . . . . . . . . . 62
A.3 Quote . . . . . . . . . . . . . . . . . . . . . 65
A.4 Multiple values . . . . . . . . . . . . . . . . 65
A.5 Exceptions . . . . . . . . . . . . . . . . . . 67
A.6 Arithmetic and basic forms . . . . . . . . . 69
A.7 Lists . . . . . . . . . . . . . . . . . . . . . . 69
A.8 Eqv . . . . . . . . . . . . . . . . . . . . . . 69
A.9 Procedures and application . . . . . . . . . 70
A.10 Call/cc and dynamic wind . . . . . . . . . . 72
A.11 Letrec . . . . . . . . . . . . . . . . . . . . . 73
A.12 Underspecification . . . . . . . . . . . . . . 74
B Sample definitions for derived forms . . . . . . . . 75
C Additional material . . . . . . . . . . . . . . . . . 77
D Example . . . . . . . . . . . . . . . . . . . . . . . 77
E Language changes . . . . . . . . . . . . . . . . . . 79
References . . . . . . . . . . . . . . . . . . . . . . . . 80
Alphabetic index of definitions of concepts, key-
words, and procedures . . . . . . . . . . . . . . . 82

标签:

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警