Clojure: returning a vector from an anonymous function

后端 未结 3 1967
盖世英雄少女心
盖世英雄少女心 2020-12-14 17:14

I wrote a small anonymous function to be used with a map call. The function returns a vector containing a column name and column value from a SQL result set que

3条回答
  •  天命终不由人
    2020-12-14 17:25

    You need to use vector function to do this:

    #(vector (keyword %) (.getObject resultset %))
    

    P.S. there are also functions for maps, sets, etc.

提交回复
热议问题