(defun join (list delimiter)
(with-output-to-string (ret)
(loop for (elt . next) on list
do (progn (write-string elt ret)
(when next
(write-string delimiter ret))))))
Raymond Wiker wrote:
(defun join (list delimiter)
(with-output-to-string (ret)
(loop for (elt . next) on list
do (progn (write-string elt ret)
(when next
(write-string delimiter ret))))))
Let's make it shorter.
Gauche Scheme and Racket:
(use srfi-1) ;; pair-for-each for Gauche.
or
(require srfi/1) ;; pair-for-each for Racket.
(require srfi/26) ;; cut for Racket.
(define (join items delim)
(with-output-to-string
(cut
pair-for-each
(lambda (xs)
(display (car xs))
(and (pair? (cdr xs)) (display delim)))
items)))
(join '(2 3 4) '-)
===>
"2-3-4"
I tend to see it as a statement on the afterlife. just when you think
the newsgroup is dead and quiet and there is nothing more, you see a
steady influx of these messages. just when you think death is final quiescence you get to see the a steady flow of torments in the lake of
fire
On 2/24/2022 8:50 PM, Madhu wrote:
I tend to see it as a statement on the afterlife. just when you thinkNothing so poetic. Just the smoke of an injured psyche moaning in
the newsgroup is dead and quiet and there is nothing more, you see a
steady influx of these messages. just when you think death is final
quiescence you get to see the a steady flow of torments in the lake of
fire
public. The smoke is all that's left.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 298 |
Nodes: | 16 (2 / 14) |
Uptime: | 24:34:28 |
Calls: | 6,678 |
Calls today: | 1 |
Files: | 12,222 |
Messages: | 5,342,032 |
Posted today: | 1 |