Commits

Shlomi Fish committed 66abeda

Add the ~ function for string concatentation.

Comments (0)

Files changed (2)

lurking-lisp-library/lurking.lisp

 ;;;(defmacro *= (x y)
 ;;;  `(setf ,x (* ,x ,y)))
 
+(defun ~ (&rest lst)
+  (apply 'concatenate 'string lst))

lurking-lisp-library/t/op-equal-sign.lisp

 
 (let ((producer (make-instance 'tap-producer)))
   (init-test producer)
-  (emit-plan producer :plan-argument 4) ; simple plan, three tests planned
+  (emit-plan producer :plan-argument 5) ; simple plan, three tests planned
   (let ((result 28))
     (-= result 4)
     ; TEST
     (emit-result producer :success (equal string1 "Start END")
                  :description "Testing op2assign directly"))
 
+  ; TEST
+  (emit-result producer :success (equal (~ "One" "Two" "Three") "OneTwoThree")
+               :description "Testing the ~ function for string concatenation.")
+
   (finalize-test producer))