chicken-scheme

    0热度

    1回答

    如何在鸡中使用getopt-long? 我有下面的代码: (require 'getopt-long) (define grammar `((help (required #f) (value #f) (single-char #\h)) (limit (required #t) (value #f) ;; optional value

    0热度

    2回答

    我将如何去增加一个变量,这就是a=0; a++;鸡? 在Common Lisp的我会做到这一点使用incf像这样: (setf a 0) (incf a) (print a) ;=> 0 ;=> 1 ;=> 1 ;=> 1 但鸡的方案似乎并不具有incf功能/宏,我已经使用apropos啄蛋尝试,但迄今为止这一切都没有帮助。 在C,我会增加变量,像这样: int a = 0;

    0热度

    1回答

    我需要从字符串中删除一个字符,但我无法弄清楚如何指定一个count,这就是应该从string中删除多少次character 。 以下是我愿意做它的Common Lisp: (let ((a "abca")) (delete #\a a :count 1)) ;=> "bca" 我会怎么做,在鸡的方案? 我在鸡使用delete试过,但鸡的delete似乎并不支持count啄的事情,所以下面做

    0热度

    3回答

    我正在清理一些(鸡)计划代码,我想确定在给定程序中没有使用的所有列表/程序。是否有一个特定的选项可以传递给鸡编译器或csi -s我可以使用这样做,而不用列出每个define和grep -ing的*.scm脚本中的标识符?

    1热度

    1回答

    绑定*我的方案代码鸡下面的代码片段: (require-extension bind) (bind* "double int_exp(double, int);") (bind* "double square(double);") (begin (print (int_exp 1.2 1)) (print (square 2.0))) int_exp和square

    6热度

    2回答

    有没有人能够配置Sublime Text 2和SublimeRepl以配合鸡肉计划? 我已经在Sublime中使用了鸡的repl,但是它仅显示来自chicken方案的错误消息(可能来自csi进程的stderr输出),但它不显示提示或评估值。 任何帮助?

    2热度

    2回答

    我会如何去获取鸡计划中的系统命令的输出? 这里是我怎么做我通常做在NewLISP: (nth 0 (exec "<COMMAND>")) ;; the `(nth 0...` is just there 'cause I only care about the first element in ;; the list returned by `exec`

    3热度

    2回答

    我可能错过了R5RS文档中的这个内容,但是如何在(鸡)方案中创建列表列表?我希望能够列出一个列表,a,调用(list-ref a b),将结果分配给c,然后调用(list-ref c d),其中b和d是索引值。 编辑:为了澄清,假设我有这些列表: (define citrus (list "oranges" "limes")) (define apples (list "macintosh" "

    1热度

    1回答

    试图安装并运行Spock(扩展名为ChickenScheme)。 起初,我甚至不知道这取决于ChickenScheme框架,但我设法安装和运行ChickenScheme $ Chicken (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.0.1 (stability/4.8.0)

    3热度

    2回答

    在试图找到如何转换这样的列表时,我碰到了 Scheme streams and circular lists。但是,该答案要求在鸡场中没有提供Racket中的功能。任何人都可以指示我如何在Chicken方案中做到这一点?或者以一种方案变种中立的方式?