Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在JTextArea上打印Clojure time-Appeased函数_Time_Clojure_Hashmap - Fatal编程技术网

如何在JTextArea上打印Clojure time-Appeased函数

如何在JTextArea上打印Clojure time-Appeased函数,time,clojure,hashmap,Time,Clojure,Hashmap,我有一个名为“output text”的JTextArea,我想附加执行函数“transfer all”所花费的时间,但它不起作用 (defn transfer-all [] (doseq [i my-map] (transfer i account-destination money) ) ) ... (.append output-text (str (time (transfer-all)))) 有什么建议吗?非常感谢(time exp

我有一个名为“output text”的JTextArea,我想附加执行函数“transfer all”所花费的时间,但它不起作用

 (defn transfer-all []
    (doseq [i my-map]
      (transfer i account-destination money)
      )
  )
    ...

  (.append output-text (str (time (transfer-all))))
有什么建议吗?非常感谢(time expr)没有返回执行expr所花费的时间,它只是打印它(并返回expr的值)


您需要
(不带str(time…)

非常感谢,我现在的代码是:(.追加输出文本(不带str(time(转账账户-a账户-b 100))))…..,并且有效。但我对“transfer all”函数有问题(和以前一样):我想对映射中的每个元素执行一个名为“transfer(from,to,amount)”的操作……您能检查一下有什么问题吗?谢谢again@nuvio请开始一个新问题,而不是背着这个问题