(defun process-numeric-list() ;; 可変長の数値リストを定義 (let ((data-list' (150 420 300 250 380))) (format t "元のリスト: ~A~%" data-list) ;; リストの要素を降順(>)にソートする (let((sorted-list(sort data-list #'> ))) ;; 2番目の要素を抽出して表示 (format t "2番目の要素:~A~%" (second sorted-list))))) (process-numeric-list)
Standard input is empty
元のリスト: (150 420 300 250 380) 2番目の要素:380
Warning: reserving address range 0x80000c0000...0x1fffffffffff that contains memory mappings. clisp might crash later! Memory dump: 0x8000000000 - 0x80000bffff 0x14e733000000 - 0x14e7332e4fff 0x14e733415000 - 0x14e733439fff 0x14e73343a000 - 0x14e7335acfff 0x14e7335ad000 - 0x14e7335f5fff 0x14e7335f6000 - 0x14e7335f8fff 0x14e7335f9000 - 0x14e7335fbfff 0x14e7335fc000 - 0x14e7335fffff 0x14e733600000 - 0x14e733602fff 0x14e733603000 - 0x14e733801fff 0x14e733802000 - 0x14e733802fff 0x14e733803000 - 0x14e733803fff 0x14e733880000 - 0x14e73388ffff 0x14e733890000 - 0x14e7338c3fff 0x14e7338c4000 - 0x14e7339fafff 0x14e7339fb000 - 0x14e7339fbfff 0x14e7339fc000 - 0x14e7339fefff 0x14e7339ff000 - 0x14e7339fffff 0x14e733a00000 - 0x14e733a03fff 0x14e733a04000 - 0x14e733c03fff 0x14e733c04000 - 0x14e733c04fff 0x14e733c05000 - 0x14e733c05fff 0x14e733d33000 - 0x14e733d36fff 0x14e733d37000 - 0x14e733d37fff 0x14e733d38000 - 0x14e733d39fff 0x14e733d3a000 - 0x14e733d3afff 0x14e733d3b000 - 0x14e733d3bfff 0x14e733d3c000 - 0x14e733d3cfff 0x14e733d3d000 - 0x14e733d4afff 0x14e733d4b000 - 0x14e733d58fff 0x14e733d59000 - 0x14e733d65fff 0x14e733d66000 - 0x14e733d69fff 0x14e733d6a000 - 0x14e733d6afff 0x14e733d6b000 - 0x14e733d6bfff 0x14e733d6c000 - 0x14e733d71fff 0x14e733d72000 - 0x14e733d73fff 0x14e733d74000 - 0x14e733d74fff 0x14e733d75000 - 0x14e733d75fff 0x14e733d76000 - 0x14e733d76fff 0x14e733d77000 - 0x14e733da4fff 0x14e733da5000 - 0x14e733db3fff 0x14e733db4000 - 0x14e733e59fff 0x14e733e5a000 - 0x14e733ef0fff 0x14e733ef1000 - 0x14e733ef1fff 0x14e733ef2000 - 0x14e733ef2fff 0x14e733ef3000 - 0x14e733f06fff 0x14e733f07000 - 0x14e733f2efff 0x14e733f2f000 - 0x14e733f38fff 0x14e733f39000 - 0x14e733f3afff 0x14e733f3b000 - 0x14e733f40fff 0x14e733f41000 - 0x14e733f43fff 0x14e733f46000 - 0x14e733f46fff 0x14e733f47000 - 0x14e733f47fff 0x14e733f48000 - 0x14e733f48fff 0x14e733f49000 - 0x14e733f49fff 0x14e733f4a000 - 0x14e733f4afff 0x14e733f4b000 - 0x14e733f51fff 0x14e733f52000 - 0x14e733f54fff 0x14e733f55000 - 0x14e733f55fff 0x14e733f56000 - 0x14e733f76fff 0x14e733f77000 - 0x14e733f7efff 0x14e733f7f000 - 0x14e733f7ffff 0x14e733f80000 - 0x14e733f80fff 0x14e733f81000 - 0x14e733f81fff 0x557c238bb000 - 0x557c239abfff 0x557c239ac000 - 0x557c23ab5fff 0x557c23ab6000 - 0x557c23b15fff 0x557c23b17000 - 0x557c23b45fff 0x557c23b46000 - 0x557c23b76fff 0x557c23b77000 - 0x557c23b7afff 0x557c25404000 - 0x557c25424fff 0x7ffc62dbd000 - 0x7ffc62dddfff 0x7ffc62def000 - 0x7ffc62df2fff 0x7ffc62df3000 - 0x7ffc62df4fff