FMap: Fast Map.

Description Usage Arguments Value See Also Examples

Description

A thin wrapper around internal mapply, which can be a bit faster than base Map.

Usage

1
FMap(fn, ...)

Arguments

fn

Function to apply.

...

Arguments to fn; Vectors or lists.

Value

A list.

See Also

Other Functionals: And, Call, Compose, Delay_by, Dot_every, Fail_with, Log_to, Maybe, Partial

Examples

1
2
3
4
5
6
require(microbenchmark)
microbenchmark(
mapply(`*`, 1:100, 101:200),
Map(`*`, 1:100, 101:200),
FMap(`*`, 1:100, 101:200),
(1:100)*(101:200))

gschofl/gsmisc documentation built on May 17, 2019, 8:52 a.m.