Carp/examples/copying.carp
2017-09-08 12:24:57 +02:00

22 lines
330 B
Plaintext

(use Array)
;;(deftype Mini [m String])
(deftype C [a String
b (Array Int)
;;m Mini
])
(use C)
(defn main []
(let [c1 (C.init @"Hej" [1 2 3])
c2 (C.copy &c1)
a1 [(C.copy &c2) (C.copy &c2) (C.copy &c2)]
a2 (copy &a1)]
(IO.println "OK.")))
(build)
(run)
(quit)