fork download
  1. (defun shell-sort (lst cmp)
  2. (let ((numbers '(5 2 8 1 9 4 0 7 3 6)))
  3. (format t "Original list: ~a~%" numbers)
  4. (let ((sorted-numbers (shell-sort numbers #'<)))
  5. (format t "sorted-numbers after shell-sort: ~a~%" sorted-numbers) ; <-- ADD THIS LINE
  6. (format t "Sorted list: ~a~%" sorted-numbers)))
  7. (format t "shell-sort called with lst = ~a~%" lst)
  8. (let ((n (length lst)))
  9. (format t "shell-sort: length(lst) = ~a~%" n)
  10. (if (<= n 1)
  11. (progn (format t "shell-sort: list is short, returning ~a~%" lst) lst)
  12. (let ((steps (sedgewick-sequence n)))
  13. (format t "shell-sort: sedgewick-sequence = ~a~%" steps)
  14. (let ((result (shell-sort-with-steps (copy-list lst) steps cmp)))
  15. (format t "shell-sort: shell-sort-with-steps returned ~a~%" result)
  16. result)))))
Success #stdin #stdout #stderr 0.01s 9400KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Warning: reserving address range 0x80000c0000...0x1fffffffffff that contains memory mappings. clisp might crash later!
Memory dump:
  0x8000000000 - 0x80000bffff
  0x14866ee00000 - 0x14866f0e4fff
  0x14866f200000 - 0x14866f202fff
  0x14866f203000 - 0x14866f401fff
  0x14866f402000 - 0x14866f402fff
  0x14866f403000 - 0x14866f403fff
  0x14866f415000 - 0x14866f439fff
  0x14866f43a000 - 0x14866f5acfff
  0x14866f5ad000 - 0x14866f5f5fff
  0x14866f5f6000 - 0x14866f5f8fff
  0x14866f5f9000 - 0x14866f5fbfff
  0x14866f5fc000 - 0x14866f5fffff
  0x14866f600000 - 0x14866f603fff
  0x14866f604000 - 0x14866f803fff
  0x14866f804000 - 0x14866f804fff
  0x14866f805000 - 0x14866f805fff
  0x14866f83d000 - 0x14866f83efff
  0x14866f83f000 - 0x14866f84efff
  0x14866f84f000 - 0x14866f882fff
  0x14866f883000 - 0x14866f9b9fff
  0x14866f9ba000 - 0x14866f9bafff
  0x14866f9bb000 - 0x14866f9bdfff
  0x14866f9be000 - 0x14866f9befff
  0x14866f9bf000 - 0x14866f9c0fff
  0x14866f9c1000 - 0x14866f9c1fff
  0x14866f9c2000 - 0x14866f9c3fff
  0x14866f9c4000 - 0x14866f9c4fff
  0x14866f9c5000 - 0x14866f9c5fff
  0x14866f9c6000 - 0x14866f9c6fff
  0x14866f9c7000 - 0x14866f9d4fff
  0x14866f9d5000 - 0x14866f9e2fff
  0x14866f9e3000 - 0x14866f9effff
  0x14866f9f0000 - 0x14866f9f3fff
  0x14866f9f4000 - 0x14866f9f4fff
  0x14866f9f5000 - 0x14866f9f5fff
  0x14866f9f6000 - 0x14866f9fbfff
  0x14866f9fc000 - 0x14866f9fdfff
  0x14866f9fe000 - 0x14866f9fefff
  0x14866f9ff000 - 0x14866f9fffff
  0x14866fa00000 - 0x14866fa00fff
  0x14866fa01000 - 0x14866fa2efff
  0x14866fa2f000 - 0x14866fa3dfff
  0x14866fa3e000 - 0x14866fae3fff
  0x14866fae4000 - 0x14866fb7afff
  0x14866fb7b000 - 0x14866fb7bfff
  0x14866fb7c000 - 0x14866fb7cfff
  0x14866fb7d000 - 0x14866fb90fff
  0x14866fb91000 - 0x14866fbb8fff
  0x14866fbb9000 - 0x14866fbc2fff
  0x14866fbc3000 - 0x14866fbc4fff
  0x14866fbc5000 - 0x14866fbcafff
  0x14866fbcb000 - 0x14866fbcdfff
  0x14866fbd0000 - 0x14866fbd0fff
  0x14866fbd1000 - 0x14866fbd1fff
  0x14866fbd2000 - 0x14866fbd2fff
  0x14866fbd3000 - 0x14866fbd3fff
  0x14866fbd4000 - 0x14866fbd4fff
  0x14866fbd5000 - 0x14866fbdbfff
  0x14866fbdc000 - 0x14866fbdefff
  0x14866fbdf000 - 0x14866fbdffff
  0x14866fbe0000 - 0x14866fc00fff
  0x14866fc01000 - 0x14866fc08fff
  0x14866fc09000 - 0x14866fc09fff
  0x14866fc0a000 - 0x14866fc0afff
  0x14866fc0b000 - 0x14866fc0bfff
  0x5562252cb000 - 0x5562253bbfff
  0x5562253bc000 - 0x5562254c5fff
  0x5562254c6000 - 0x556225525fff
  0x556225527000 - 0x556225555fff
  0x556225556000 - 0x556225586fff
  0x556225587000 - 0x55622558afff
  0x5562266d9000 - 0x5562266f9fff
  0x7ffd414e1000 - 0x7ffd41501fff
  0x7ffd4152a000 - 0x7ffd4152dfff
  0x7ffd4152e000 - 0x7ffd4152ffff