public function offsetGet($offset) { return $this->offsetExists($offset) ? Option::Some($this->get()[$offset]) : Option::None(); }
/** * @param \Closure $producer * @return Option */ public function otherwise(\Closure $producer) { return Option::Some($producer()); }