public function step($result, $input) { $pval = $this->pval; $val = call_user_func($this->f, $input); $this->pval = $val; $none = Transducers::none(); if ($pval === $none || $pval === $val) { $this->a[] = $input; return $result; } $ret = $this->xf->step($result, $this->a); $this->a = []; if (!Transducers::isReduced($ret)) { $this->a[] = $input; } return $ret; }