public function partition(Closure $p)
{
$matches = $noMatches = array();
foreach ($this->elements as $key => $element) {
if ($p($key, $element)) {
$matches[$key] = $element;
} else {
$noMatches[$key] = $element;
}
}
return array($this->createFrom($matches), $this->createFrom($noMatches));
}