scheme和common lisp 区别
Scheme and Common Lisp use different names for some of the basic system functions. Many Lisp programs can be translated to the other dialect simply by changing these names (or by providing the existing names as macros or functions). Compatibility packages exist to allow programs in one dialect to run in the other dialect.
The following table gives correspondences between Scheme functions and the equivalent Common Lisp functions.
Scheme: | Common Lisp: |
(define (fn args ...) code) | (defun fn (args ...) code) |
begin | progn |
set! | setq |
eq? | eq |
eqv? | eql |
equal? | equal |
number? | numberp |
zero? | zerop |
pair? | consp |
null? | null |
display | princ |
write | prin1 |
newline | terpri |
(list-tail lst n) | (nthcdr n lst) |
(list-ref lst n) | (nth n lst) |
subset? | subsetp |
map | mapcar |
for-each | mapc |
vector-ref | aref |
vector-set! | (setf (aref ...) val) |
substring | subseq |
#t | t |
#f | nil |
'() | '() or nil |
The following table lists standard Common Lisp functions that are provided in the file initdr.scm.(http://www.cs.utexas.edu/ftp/bogo/cs307/initdr.scm)
dotimes |
dolist |
intersection |
union |
set-difference |
copy-list |
subset |
every |
some |
copy-tree |
subst |
sublis |
nconc |
nreverse |
转自:
scheme和common lisp 区别的更多相关文章
- common lisp和scheme的区别
1. 在Common Lisp 眼中,一个符号的symbol-value 和symbol-function 是不一样的,而Scheme对两者不作区分.在Scheme 里面,变量只有唯一对应的值,它可以 ...
- 在windows上安装common lisp开发环境
(2014.1写于CSDN的文章) 最近对lisp非常感兴趣,因此在google中搜索了“common lisp install windows”, 想装一个开发环境玩玩. 第一条结果就是 “Gett ...
- ANSI Common Lisp Practice - My Answers - Chatper - 3
Ok, Go ahead. 1 (a) (b) (c) (d) 2 注:union 在 Common Lisp 中的作用就是求两个集合的并集.但是这有一个前提,即给的两个列表已经满足集合的属性了.具体 ...
- 搭建fedora开发环境 common lisp, c++, go
第三方软件库: http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/index.h ...
- Difference between LET and LET* in Common LISP
Difference between LET and LET* in Common LISP LET Parallel binding which means the bindings com ...
- Common Lisp编译程序的小技巧
这几天开始玩Common Lisp,遇上了一个有意思的问题,CL一般是解释运行,也有实现可以编译生成字节码(fas文件).我正在用的两种CL实现是SBCL和CLISP,前者是我从<实用Commo ...
- slime+sbcl for common lisp
sudo apt-get install slime audo apt-get install sbcl ;;sbcl+slime for common lisp ;;sudo apt-get ins ...
- Common Lisp 编译器IDE环境搭建
搭建Common Lisp编程环境的方法有很多种,这里我使用的是最常见的一种:SBCL + Emacs + SLIME. SBCL是Steel Bank Common Lisp的简称,它是Common ...
- 推动Common Lisp的实际应用
推动Common Lisp的实际应用 推动Common Lisp的实际应用
随机推荐
- Qt 学习之路:坐标系统
在经历过实际操作,以及前面一节中我们见到的那个translate()函数之后,我们可以详细了解下 Qt 的坐标系统了.泛泛而谈坐标系统,有时候会觉得枯燥无味,难以理解,好在现在我们已经有了基础. 坐标 ...
- HTML及简单标签介绍
什么是HTML: HTML 语言是一种超文本的标记语言,简单来讲就是构建一套标记符号和语法规则,将所要显示出来的文字.图象.声音等要素按照一定的标准要求排放,形成一定的标题.段落.列表等单元. 标签 ...
- navigation的pushViewController卡顿问题
问题:在ios中一个viewController中,添加下面代码: <pre name="code" class="objc">UIViewCont ...
- iOS 复杂动画之抽丝剥茧
一.前言 随着开发者的增多和时间的累积,AppStore已经有非常多的应用了,每年都有很多新的APP产生.但是我们手机上留存的应用有限,所以如何吸引用户,成为产品设计的一项重要内容.其中炫酷的动画效果 ...
- Bash算术计算
1:$(( )) 2:$[ ] 3:`expr $x + $y` 4:bc命令 #!/bin/bash x= y= echo $(( x + y )) echo $[ $x + $y ] echo ` ...
- gamit10.6问题汇总
1.在处理精密星历时,提示:old version of file not supported (name svnav.dat) 解决办法:在gamit10.5中不会出现这个问题,10.6中的官方文档 ...
- 10.31 morning
NP(np)Time Limit:1000ms Memory Limit:64MB题目描述LYK 喜欢研究一些比较困难的问题,比如 np 问题.这次它又遇到一个棘手的 np 问题.问题是这个样子的:有 ...
- Castle Windsor 使MVC Controller能够使用依赖注入
以在MVC中使用Castle Windsor为例 1.第一步要想使我们的Controller能够使用依赖注入容器,先定义个WindsorControllerFactory类, using System ...
- C#生成验证码实例
常用生成验证码实例封装: /// <summary> /// 生成内存位图 /// </summary> /// <param name="Code" ...
- .NET 4.6
http://referencesource.microsoft.com/ DownLoad 下载原代码