View Problem

Find the common items in two lists

Given two lists, find the common items. E.g. given beans = ['broad', 'mung', 'black', 'red', 'white'] and colors = ['black', 'red', 'blue', 'green'], what are the bean varieties that are also color names?
ExpandDiskEdit
php
$result = array_intersect($beans, $colors);
sort($result); // just to clean it up :)
DiskEdit
clojure
(use 'clojure.set)

(let [beans '[broad mung black red white]
colors '[black red blue green]]
(intersection (set beans) (set colors)))

Submit a new solution for php or clojure
There are 19 other solutions in additional languages (cpp, csharp, erlang, fantom ...)