fp.js
function (...values) {
    let list = [];
    let {main, follower} = reuseables.getMainAndFollower(values);

    main.forEach(x=>{
      if(list.indexOf(x) ==-1) {
        if(follower.indexOf(x) >=0) {
          if(list[x] ==undefined) list.push(x) }
      }
    })
    return list;
  }
function (...values) {
    let list = [];
    let {main, follower} = reuseables.getMainAndFollower(values);

    main.forEach(x=>{
      if(list.indexOf(x) ==-1) {
        if(follower.indexOf(x) >=0) {
          if(list[x] ==undefined) list.push(x) }
      }
    })
    return list;
  }
function ( ... values ) { let list = [ ] ; let { main , follower } = reuseables . getMainAndFollower ( values ) ; main . forEach ( x => { if ( list . indexOf ( x ) == - 1 ) { if ( follower . indexOf ( x ) >= 0 ) { if ( list [ x ] == undefined ) list . push ( x ) } } } ) return list ; }
Returns values in two comparing arrays without repetition.
Arrangement of resulting array is determined by main array.
@param 1st Any number of individual arrays
@param 2nd {number} Position number of array to be used as main
@param 3rd {number} Position number of to be used as follower
@returns values found in both arrays
Returns values in two comparing arrays without repetition . Arrangement of resulting array is determined by main array .