Talk:Best shuffle: Difference between revisions

→‎Common Lisp: this should be it
(→‎Common Lisp: now just need to get the order in the output right :-))
(→‎Common Lisp: this should be it)
Line 185:
 
(defun format-best-shuffle (seq)
(format t "~{~Sa ~a (~d)~}~%" (reverse (best-shuffle seq))))
 
 
(let ((input '("abracadabra" "seesaw" "elk" "grrrrrr" "up" "a")))
(map 'nil 'format-best-shuffle input))
abracadabra arbrabacada (2)
2 "dabrbarcaaa" "abracadabra"
seesaw esaews (0)
0 "essawe" "seesaw"
0elk "lke" "elk" (0)
grrrrrr rrrgrrr (5)
5 "rrgrrrr" "grrrrrr"
0up "pu" "up" (0)
1 "a" "a" (1)
NIL
</lang>
Anonymous user