maps function f over the values produced by this generator

@param callable $f
@return Generator
501180
public function fmap(callable $f)
    {
        return $this->fmapGen(function (RoseTree $rose) use ($f) {
            return $rose->fmap($f);
        });
    }
196788
public static function map($xs, $f)
    {
        foreach ($xs as $i => $x) {
            yield $i => call_user_func($f, $x, $i, $xs);
        }
    }
401554
public function map(Closure $func) : Collection
    {
        return $this->createFrom(array_map($func, $this->elements));
    }
230386
public function map(callable $func)
    {
        $containers = array_slice(func_get_args(), 1); // remove `$func`
        $haystack = $this->toHArray();

        if (empty($containers)) {
            return new static((new HArray((new HaystackMap($haystack))->map($func)))->toHString());
        }

        return new static((new HArray((new HaystackMap($haystack))->map($func, $containers)))->toHString());
    }
1196183
public <V> Resources<V> transform(Function<T, V> fn) {
        return new Resources<>(
                resources.stream().map(fn).collect(Collectors.toList()),
                get_self(),
                pagination,
                Object.class
        ).withLinks(getLinks());
    }
263186
public function bind(callable $function) : Monadic
    {
        $concat = compose(
            function (array $list) use ($function) {
                return fold(
                    function ($acc, $item) use ($function) {
                        $acc[] = $function($item)->extract();

                        return $acc;
                    },
                    $list,
                    []
                );
            },
            partialLeft('array_merge', $this->collection)
        );

        return self::of(flatten($concat($this->collection)));
    }
745233
public static function mapCommand(callable $f)
    {
        return function (callable $handler) use ($f) {
            return function (
                CommandInterface $command,
                RequestInterface $request = null
            ) use ($handler, $f) {
                return $handler($f($command), $request);
            };
        };
    }
846414
def map(self, f):
        
        return self._replace(recver=self.recver.map(f))
231222
function swap (callable $fn)
  {
    $this->pack ();
    $this->data = $fn ($this->data);
    return $this;
  }
1248457
public function transform(callable $fn)
    {
        $this->prepare();

        $new_data = [];
        foreach ($this->_map as $key => $val) {
            $new_data[$key] = $fn($val);
        }

        return $this->prepareResult($new_data, false);
    }
1371124
def map(self, fn: Callable[[Any], Any]) -> 'Reader':
        
        """
        def _compose(x: Any) -> Any:
            try:
                ret = fn(self.run(x))
            except TypeError:
                ret = partial(fn, self.run(x))
            return ret
        return Reader(_compose)
1305115
protected function buildSubquery(callable $f)
    {
        $query = new SelectQuery();
        $query->getSelect()->clearFields();
        $f($query);
        $sql = $query->build();
        $this->values = array_merge($this->values, $query->getValues());

        return '('.$sql.')';
    }
838307
public function map(callable $f) {
        if( $this->value !== null ) return Result::success($f($this->value));
        if( $this->error !== null ) return $this;
        throw new \LogicException("Value and error cannot both be null");
    }
307036
public static function mapRecursive($iterable, callable $callable): array
    {
        Assert::isIterable($iterable);

        // If internal method with one arg, like strtolower, limit to first arg so warning isn't triggered.
        $ref = new \ReflectionFunction($callable);
        if ($ref->isInternal() && $ref->getNumberOfParameters() === 1) {
            $callable = function ($arg) use ($callable) {
                return $callable($arg);
            };
        }

        return static::doMapRecursive($iterable, $callable);
    }
247248
public function fields(array $f)
    {
        $this->fields = $f;
        $this->mongoCursor->fields($f);
        return $this;
    }
1221832
public function filterWithIndex(callable $function): Seq
    {
        $result = new Seq();

        foreach ($this->data as $key => $value) {
            if (!!$function($key, $value)) {
                $result = $result->append($value);
            }
        }

        return $result;
    }
789701
public function setAppendFormFieldsFunction(callable $function)
    {
        $validator = $this->getCallableValidatorAppendFormFields();
        $validator->setCallableFunction($function);

        if ($validator->isValid() === false) {
            throw $validator->getException();
        }

        $this->appendFormFieldsFunction = $function;

        return $this;
    }