RosettaCodeData/Task/Copy-a-string/EchoLisp/copy-a-string.echolisp
2016-12-05 23:44:36 +01:00

6 lines
216 B
Text

(define-syntax-rule (string-copy s) (string-append s)) ;; copy = append nothing
→ #syntax:string-copy
(define s "abc")
(define t (string-copy s))
t → "abc"
(eq? s t) → #t ;; same reference, same object