3 ms·
It's a jab against the general case, below. A lame, wasteful little script to print out a TODO list ;-) (defun map-print (item list) (mapcar (lambda (x)
by mahmud 16y ago
It's a jab against the general case, below.
A lame, wasteful little script to print out a TODO list ;-)
(defun map-print (item list)
(mapcar (lambda (x)
(format t "~a in ~a~%" item x)) list))
(defun permute (list)
(mapcar (lambda (x)
(map-print x list)) list))
(defun languages ()
(destructuring-bind (response headers body)
(trivial-http:http-get "http://mahmud.arablug.org/languages.txt")
(when (= response 200)
(loop for line = (read-line body nil nil)
while line
collecting line))))
(permute (languages))