首页 > 其他 > 详细

MIT Scheme Development on Ubuntu

时间:2014-03-18 09:10:21      阅读:472      评论:0      收藏:0      [点我收藏+]
  1. sudo apt-get mit-scheme;

  2. run "scheme" then you enter the command line scheme repl;

  3. sudo apt-get emacs;

  4. modify "(setq scheme-program-name "scm")" in .emacs to "(setq scheme-program-name "scheme")", because our scheme command is "scheme";

  5. install quack with apt-get install emacs-goodies-el;

  6. open emacs and create a new buffer with "C-x C-f myfile.scm";

  7. input following code:

(define (mydouble x) (+ (* x 2) 10))

  1. save file: C-x C-s;

  2. split window: C-x 2;

  3. switch to bottom window: C-x o;

  4. start scheme repl at bottom window: M-x run-scheme

  5. switch back to top window: C-x o;

  6. parse code: C-x C-e;

  7. switch back to bottom window(C-x o) and run "(mydouble 3)", you got 16;

  8. modify source file in upper window and parse it again (C-x C-e);

  9. run "(mydouble 3)" again, now you get another value;

Ref: A tutorial for using Emacs with Scheme

MIT Scheme Development on Ubuntu,布布扣,bubuko.com

MIT Scheme Development on Ubuntu

原文:http://www.cnblogs.com/darkmatter/p/3606764.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!