1 contributor
Like
Install inner-join as a package?
Copied
npm i @bit/justin-capalbo.ramda.inner-join
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
innerJoin (
pred:
Function
,xs:
Array
,ys:
) : Array
Array
Takes a predicate pred
, a list xs
, and a list ys
, and returns a list
xs'
comprising each of the elements of xs
which is equal to one or more
elements of ys
according to pred
.
pred
must be a binary function expecting an element from each list.
xs
, ys
, and xs'
are treated as sets, semantically, so ordering should
not be significant, but since xs'
is ordered the implementation guarantees
that its values are in the same order as they appear in xs
. Duplicates are
not removed, so xs'
may contain duplicates if xs
contains duplicates.
Example
Arguments
pred:
Function
xs:
Array
ys:
Array
Returns
Array