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的实际应用
随机推荐
- android 33 对话框控件
对话框控件:最多3个按钮. mainActivity.java package com.sxt.day05_09; import android.app.Activity; import androi ...
- android 26 设置项目有多个入口Activity。
第一个activity package com.sxt.day04_11; import android.os.Bundle; import android.app.Activity; import ...
- GCC相关的环境变量
介绍GCC在编译阶段和程序运行阶段用到的环境变量. GCC编译时用到的环境变量 GCC编译时用到的变量. C_INCLUDE_PATH GCC编译时查找头文件的目录列表.比如: echo $C_INC ...
- codevs 1519 过路费 最小生成树+倍增
/*codevs 1519 过路费 最小生成树+倍增*/ #include<iostream> #include<cstdio> #include<cstring> ...
- Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
canvas绘制图片,由于浏览器的安全考虑,如果在使用canvas绘图的过程中,使用到了外域的图片资源,那么在toDataURL()时会抛出安全异常: Uncaught SecurityError: ...
- 关键词:CodeSmith工具、Money类型、__UNKNOWN__
问题描述: 当数据库列类型有Money类型的时候,CodeSmith生成数据访问层会出错.有不能识别的类型.解决方法: 通过查找资料得知,数据库中的Money类型在DbType中是Currency(货 ...
- jar包的生成及运行
Hello, 大家好,我们见面了,今天是2015年7月30日,我在青岛,你好吗? 这里总结下刚学习到的jar包的生成和运行,网上的资料一搜一大片,我这里总结下适用的 一:jar包的生成: 1:命令行, ...
- Android 安全性和权限
自定义权限 permission <permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT& ...
- 详细查看数据库SQL执行计划
DBCC DROPCLEANBUFFERS 清除数据缓存DBCC FREEPROCCACHE 清除执行计划缓存 SET SHOWPLAN_XML ON 此语句导致 SQL Server 不执行 Tr ...
- xargs rm -rf 与 -exec rm
# find ./ -exec rm {} \; # find ./ | xargs rm -rf 两者都可以把find命令查找到的结果删除,其区别简单的说是前者是把find发现的结果一次性传给exe ...