Yet Another Scheme Introduction学习
Chapter 2
Function exact->inexact is to convert from fractional numbers to floating point numbers.
Formulas consisting of parentheses, tokens, and separators are called S-expressions.
Chapter 3
Cons cells are a memory spaces which storage two addresses.
Function cons allocates a memory space for two addresses. and stores the address to 1 in one part and to 2 in the other part. The part storing the address to 1 is called car part and that storing the address to 2 is called cdr part. Car and cdr are abbreviations of Contents of the Address part of the Register and Contents of the Decrement part of the Register.
Lists are (beaded) cons cells with the cdr part of the last cons cell being '(). '() is called the empty list, which is included to lists.
Data structures which do not use cons cells are called atom. Numbers, characters, strings, vectors, and '() are atom. '() is an atom and a list as well.
A special form named quote is used to protect tokens from evaluation.
Functions that returns the car part and the cdr part of a cons cell is called car and cdr, respectively.
Function list is available to make a list consisting of several elements. Function list takes arbitrary numbers of arguments and returns a list of them.
Chapter 4
You use define to bind a symbol to a value. You can define any kind of global parameters, such as numbers, characters, lists, etc. and functions by this operator.
The define is a operator to declare variables and takes two arguments. The operator declares to use the first argument as a global parameter and binds it to the second argument.
The lambda is a special form to define procedures. The lambda takes more than one arguments and the first argument is the list of parameters that the procedure takes as arguments.
Chapter 5
false is represented by #f. The representing value of true is #t.
so many operaters and functions
chapter 6
Local variables can be defined using the let expression.
(let binds body)
Variables are declared and assigned to initial values in the binds form. The body consists of arbitrary numbers of S-expressions.
[binds] → ((p1 v1) (p2 v2) ...)
Variables p1, p2 ... are declared and bind them to the initial values, v1, v2 ... The scope of variables is the body, which means that variables are valid only in the body.
The let* expression is available to refer variables which is defined in the same binding form. Actually, the let* expression is a syntax sugar of nested let expressions.
Yet Another Scheme Introduction学习的更多相关文章
- Deep Learning(1)-Introduction学习总结
学习DL搁置很久了,终于下定决心开始咯~~ Deep Learning(Ian Goodfellow&&Yoshua Bengio&&Aaron Courville)- ...
- 南京大学 静态软件分析(static program analyzes)-- introduction 学习笔记
一.Programming Languages体系 静态程序分析是编程语言中应用层面下的一个细分领域,它是一个非常重要的核心内容. 在理论部分,考虑的是如何设计一个语言的语法和语义,如何设计语言的类型 ...
- 开始学习Scheme
开始学习Scheme 函数式编程(Functional Programming)是在MIT研究人工智能(Artificial Intelligence)时发明的,其编程语言为Lisp.确切地说,L ...
- 全民Scheme(0):lat的定义
接下来我会写一写Scheme的学习笔记.嗯,Scheme是属于小众的语言,但合适用来教学的. 什么是lat,就是遍历list里的每一个S-expression,假设发现当中某个不是atom的,则返回f ...
- 残差网络resnet学习
Deep Residual Learning for Image Recognition 微软亚洲研究院的何凯明等人 论文地址 https://arxiv.org/pdf/1512.03385v1.p ...
- 卷积神经网络之ResNet网络模型学习
Deep Residual Learning for Image Recognition 微软亚洲研究院的何凯明等人 论文地址 https://arxiv.org/pdf/1512.03385v1.p ...
- FactorVAE论文学习-1
Disentangling by Factorising 我们定义和解决了从变量的独立因素生成的数据的解耦表征的无监督学习问题.我们提出了FactorVAE方法,通过鼓励表征的分布因素化且在维度上独立 ...
- Scheme语言实例入门--怎样写一个“新型冠状病毒感染风险检测程序”
小学生都能用的编程语言 2020的春季中小学受疫情影响,一直还没有开学,孩子宅在家说想做一个学校要求的研究项目,我就说你做一个怎么样通过编程来学习数学的小项目吧,用最简单的计算机语言来解决小学数学问题 ...
- nomasp 博客导读:Android、UWP、Algorithm、Lisp(找工作中……
Profile Introduction to Blog 您能看到这篇博客导读是我的荣幸.本博客会持续更新.感谢您的支持.欢迎您的关注与留言.博客有多个专栏,各自是关于 Android应用开发 .Wi ...
随机推荐
- QtSQL学习笔记(1)- 概述
Qt SQL是Qt提供的核心模块,用以支持SQL数据库.Qt SQL的API被分为不同的层: ■ 驱动层 (Driver layer) ■ API层 (SQL API layer) ■ 用户接口层 ( ...
- vs快捷键及常用设置(vs2012版)
vs快捷键: 1.ctrl+f F是Find的简写,意为查找.在vs工具中按此快捷键,可以查看相关的关键词.比如查找哪些页面引用了某个类等.再配合查找范围(整个解决方案.当前项目.当前文档等),可以快 ...
- 查找计算机IP及占用端口
1. 在电脑启动搜索框,输入cmd回车打开命令提示符窗口. 输入ipconfig,就可以查看电脑的子网淹没,默认网关,IP等信息. 2. 查看本机开放的端口,即已被占用的端口号. 命令: netsta ...
- ECSHOP 订单状态 记录
记录订单状态 order_status /* 订单状态 */ define(‘OS_UNCONFIRMED’, 0); // 未确认 define(‘OS_CONFIRMED’, ...
- 【加密】RSA加密之算法
RSA公钥加密算法是1977年由Ron Rivest.Adi Shamirh和LenAdleman在(美国麻省理工学院)开发的. RSA算法是一种非对称密码算法,所谓非对称,就是指该算法需要一对密钥, ...
- T[]与List<T>的使用时机
所有的数组类型都隐式地从System.Array这个抽象类派生,而System.Array又派生自System.Object.也就是说数组是引用类型.通过如下方式创建数组: int[] arrInt ...
- C# - 定义集合,索引符
Animal 类 Cow类 Chicken类 Animal 集合类 调用
- 聊聊iOS开发中耳机的那点事(监听耳机拔插、耳机线控)-b
如果说一个项目出现的最重大的事故,那无疑就是开发人员使用了不可控的元素. 前言 iOS开发当中有关于视音频播放的开发不在少数,用户时常会使用到一种输出设备,那就是"耳机",这一篇博 ...
- python 内建函数 str() 和 repr() 的区别
1.内建函数str()和repr() 或反引号操作符(``)可以方便地以字符串的方式获取对象的内容.类型.数值属性等信息. 2.str()函数得到的字符串可读性好(故被print调用) 3.repr( ...
- 代码审查工具 StyleCop 的探索
最近我们Advent Data Service (ADS) 在项目上需要按照代码规范进行代码的编写工作,以方便将来代码的阅读与维护. 但是人工检查起来容易遗漏或者格式不统一, ReSharper又是收 ...