zoukankan      html  css  js  c++  java
  • 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

    转自:

  • 相关阅读:
    串口基本知识
    20180826
    20180819
    自动化测试
    说话有重点 测试思维
    学习C语言,在软件测试中如何用?
    PC能替代服务器吗?
    服务器与普通电脑的区别?
    k8s 回滚应用
    k8s Service
  • 原文地址:https://www.cnblogs.com/youxin/p/3637645.html
Copyright © 2011-2022 走看看