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的实际应用
随机推荐
- COMPACT 行记录格式
CREATE TABLE `mytest` ( `t1` varchar() DEFAULT NULL, `t2` varchar() DEFAULT NULL, `t3` ) DEFAULT NUL ...
- mysqladmin
mysqladmin -r -i 2 ex | grep Innodb_rows_inserted
- cflow察看工程函数调用关系+Linux 0.11 内核实验环境
http://savannah.gnu.org/projects/cflow http://tinylab.org/linux-0.11-lab/ http://ftp.gnu.org/gnu/cfl ...
- 亲测安装php
亲测安装php1.tar zvxf php-5.3.8.tar.gz 2.cd php-5.3.83../configure \ --prefix=/usr/local/php \--with-mys ...
- maven 依赖冲突的问题
如果原始系统的jarA依赖jarB1.0 而新引入的jarC依赖jarB2.0 导致系统启动报错,提示冲突,这时为了保证原始系统的稳定性, 在pom.xml文件中引入jarC时,需要exclude掉j ...
- 内存储与外存储(IO流的应用)
存储分为内存储,外存储(Sd卡存储),其中还涉及IO流的应用. 我们先来看内存储,在布局中EditView中输入的内容,通过点击按钮,分别进行保存,读取,删除的操作,读取时显示在下面的TextView ...
- android EventBus 的使用
今天简单的介绍 一下啊 android EventBus 的使用 EventBus 在官方介绍中是订阅......什么的 一大堆 , 在我android 菜鸟眼里 就是用来代替android 广 ...
- Android性能优化之ViewStub
http://www.cnblogs.com/lwbqqyumidi/p/4047108.html ViewStub是Android布局优化中一个很不错的标签/控件,直接继承自View.虽然Andro ...
- app图标和启动页设置
弄了一下午,终于把iOS中图标的设置和启动页的设置弄明白了.我想以后再也不会浑了. 进入正题: 一:apple 1).iPhone4s 3.5寸屏,也就是640*960,但在模拟器上正常用的是320* ...
- 【转】 iOS-Core-Animation-Advanced-Techniques(七)
高效绘图.图像IO以及图层性能 高效绘图 原文:http://www.cocoachina.com/ios/20150106/10840.html 不必要的效率考虑往往是性能问题的万恶之源. ——Wi ...