(ns clojure.examples.example
(:gen-class))
(defn Example []
(defstruct Employee :EmployeeName :Employeeid)
(def emp (struct-map Employee :EmployeeName "John" :Employeeid 1))
(def newemp (assoc emp :EmployeeName "Mark"))
(println newemp))
(Example)
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265706.html