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 ...
随机推荐
- GCC编译器入门
GCC(GNU Compiler Collection,GNU编译器套件),是由 GNU 开发的编程语言编译器.它是以GPL许可证所发行的自由软件,也是 GNU计划的关键部分.GCC原本作为GNU操作 ...
- Demo学习: CalendarPanel
CalendarPane 学习CalendarPanel控件的常用事件. DayClick(...) //点击日期块空白部分触发EventClick(...) //点击日期块上事件触发RangeSel ...
- 从Windows远程Ubuntu
关键字:Windows,Ubuntu,Putty,WinSCP OS:Windows 7,Ubuntu. 1.下载Putty:http://www.putty.org/. 2.双击运行putty.ex ...
- less的使用方法
LESS学习 1.变量 我们可以把一个css样式的值赋给一个参数,然后再设置样式的时候只需要设置这个参数名,如果要修改,就改参数的值就可以了. demo.html <!DOCTYPE html& ...
- Drupal commerce 性能优化
从开始的时候打开一个页面需要超过9秒的时间到现在可以在3秒内打开,给自己带来了很多欣慰. 开始的时候是认为server性能不足,所以讲aliyun服务器从1核升级到了4核,但是发现升级之后和升级之前是 ...
- Spring核心框架 - AOP的原理及源码解析
一.AOP的体系结构 如下图所示:(引自AOP联盟) 层次3语言和开发环境:基础是指待增加对象或者目标对象:切面通常包括对于基础的增加应用:配置是指AOP体系中提供的配置环境或者编织配置,通过该配置A ...
- 粗略阅读《Agile Software Development》后的感想
大致配合翻译和词典阅读了一下这篇文章之后,我另外还查阅了维基百科.百度百科和MBA智库百科还有一些网络上的文章.对敏捷开发有了一个大致上的浅显的认识. 敏捷建模(Agile Modeling,AM)的 ...
- Nhibernate 一对多,多对一配置
先来分析下问题,这里有两张表:Users(用户表) U和PersonalDynamic(用户动态表) PD,其中PD表的UserId对应U表的Id 如图: 现在映射这两张表: 如图: User.hbm ...
- Android 虚拟机Dalvik、Android各种java包功能、Android相关文件类型、应用程序结构分析、ADB
Android虚拟机Dalvik Dalvik冲击 随着Google 的AndroidSDK 的发布,关于它的API 以及在移动电话领域所带来的预期影响这些方面的讨论不胜枚举.不过,其中的一个话题在J ...
- python 中参数*args, **kwargs
def func(*args, **kwargs): print 'args : ', args print 'kwargs :', kwargs def test(): func(1,2,'x',' ...