アットウィキロゴ

memq

書式

(memq ELEMENT LIST)

リストを要素で検索(eq)する。見つかったらその要素を含め以降のリストを返す。
見つからない場合はnilを返す

(setq cell '("value1" "value2" "value3" "value4"))
(setq cell1 cell)
(memq "value10" cell) #=> nil
(memq "value1" cell) #=> nil
(memq (car cell1) cell) #=> ("value1" "value2" "value3" "value4")

名前:
コメント:
最終更新:2011年08月23日 02:52