William James
11/18/2015 8:16:00 PM
Dan Bensen wrote:
> (defmacro do-unordered-pairs ((x y list &optional (return-value nil))
> &body body)
> (let ((rest (gensym)))
> `(block do-unordered-pairs
> (loop for (,x . ,rest) on ,list do
> (loop for ,y in ,rest do
> (progn ,@body)))
> ,return-value)))
>
> (format t "~A~%"
> (do-unordered-pairs (a b '(1 5 2 8 6))
> (when (> a 7)
> (format t "~%Got a val>7: ~D.~%" a)
> (return-from do-unordered-pairs "Done."))
> (format t " (~D,~D) " a b)
> ))
> =>
> (1,5) (1,2) (1,8) (1,6) (5,2) (5,8) (5,6) (2,8) (2,6)
> Got a val>7: 8.
> Done.
MatzLisp (Ruby):
[1,5,2,8,6].combination(2).each{|a,b|
break (puts "\nGot val>7: #{a}"; :Done) if a>7
print " (#{a},#{b}) " }
(1,5) (1,2) (1,8) (1,6) (5,2) (5,8) (5,6) (2,8) (2,6)
Got val>7: 8
==>:Done
--
Under the disguise of liberalism, humanism, and democracy, Europeans have been
persuaded to commit racial suicide -- a race that has achieved so much and has
survived so much has been tricked into welcoming its own downfall and to take
active measures in order to become a stranger on its own soil.
www.kolumbus.fi/aquilon/moscowspeech2010.htm