iteye_3906 2009-08-19 15:18
浏览 205
已采纳

Clojure: (apply map + '((1 2 ) (3 4) (5 6)))

In Clojure,
[code="java"]
(apply map + '((1 2 ) (3 4) (5 6)))
[/code]

produce result: code="java" [/code]

Can anyone help me to understand how does it work?
Thank you in advance!

  • 写回答

2条回答 默认 最新

  • rednaxelafx 2009-08-19 18:24
    关注

    I belive the expression
    [code="clojure"](apply map + '((1 2 ) (3 4) (5 6)))[/code]
    evaluates to:
    code="clojure"[/code]
    instead of (6 9), which is the same with Scheme. What version of Clojure are you using?

    The expression is pretty much equivalent to the following:
    code="clojure" '(5 6))[/code]
    Take a look at [url=http://www.scheme.com/tspl3/control.html#./control:h4]this page[/url], look for the part that explains "map".

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 访问url时不会自动调用其 Servlet的doGet()
  • ¥15 用白鹭引擎开发棋牌游戏的前端为什么这么难找
  • ¥15 MATLAB解决问题
  • ¥35 哪位专业人士知道这是什么原件吗?哪里可以买到?
  • ¥15 关于#c##的问题:treenode反序列化后获取不到上一节点和下一节点,Fullpath和Handle报错
  • ¥15 一部手机能否同时用不同的app进入不同的直播间?
  • ¥15 没输出运行不了什么问题
  • ¥20 输入import torch显示Intel MKL FATAL ERROR,系统驱动1%,: Cannot load mkl_intel_thread.dll.
  • ¥15 点云密度大则包围盒小
  • ¥15 nginx使用nfs进行服务器的数据共享