fork download
  1. (defun process-numeric-list-second ()
  2. (let ((data-list '(150 420 300 250 380)))
  3. (format t "元のリスト : ~A~%" data-list)
  4.  
  5. ;; コピーを作成して降順ソート
  6. (let ((sorted-list (sort (copy-list data-list) #'>)))
  7. ;; second 関数で2番目の要素を取得
  8. (format t "2番目の要素 : ~A~%" (second sorted-list)))))
  9.  
  10. (process-numeric-list-second)
Success #stdin #stdout 0.01s 29092KB
stdin
Standard input is empty
stdout
元のリスト : (150 420 300 250 380)
2番目の要素 : 380