【问题标题】:Is there a standard function in Clojure that takes an argument, ignores it and returns a constant?Clojure 中是否有一个标准函数接受一个参数,忽略它并返回一个常量?
【发布时间】:2015-10-07 13:45:45
【问题描述】:

Clojure 中是否有一个标准函数可以做到:

(defn const [x] (fn [_] x))

?

【问题讨论】:

标签: clojure


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-27
    相关资源
    最近更新 更多