2011-04-15から1日間の記事一覧

Yet Another Common Lisp Problems #6 drop

再開。 ●問題6 リスト xs の先頭から n 個の要素を取り除く関数 drop xs n を定義してください。なお、Common Lisp には同等の機能を持つ関数 nthcdr があります。 > (drop '(a b c d e) 3) (d e) > (drop '(a b c d e) 0) (a b c d e) > (drop '(a b c d e…