Nested function: Difference between revisions
Content deleted Content added
Added Common Lisp |
|||
Line 71:
Console.WriteLine(MakeList(". "));</lang>
=={{header|Common Lisp}}==
<lang lisp>(defun my-make-list (separator)
(let ((counter 0))
(flet ((make-item (item)
(format nil "~a~a~a~%" (incf counter) separator item)))
(concatenate 'string
(make-item "first")
(make-item "second")
(make-item "third")))))
(format t (my-make-list ". "))</lang>
=={{header|Fortran}}==
|