How do I add a list to a table in Clojure? -


this model of list.

[ [name age salary] [name age salary] [name age salary] ] 

let's have def named "description_list" contains list.

how iterate through description_list , put table. tried doing this:

(print-table [:name :age :salary] description_list) 

and prints out 3 empty rows of table me. need contain information list. how can accomplish this?

this expected behaviour. see doc print-table.

prints collection of maps in textual table.

so need turn descr_list list of maps. e.g.

user=> (let [h [:a :b]               d [[1 2][3 4]]]           (clojure.pprint/print-table              h              (map (partial zipmap h) d)))  | :a | :b | |----+----| |  1 |  2 | |  3 |  4 | 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -