title: The correct approach to create multi-argument functions
body: <p>I thought about the correct approach to create functions in JavaScript functional programming and Ramda.</p>
  <p>We have <code>deviceTypes</code>, collection of <code>devices</code> and object with <code>filter</code>:</p>
  <pre><code>const deviceTypes = {
      phone: 'phone',
      tv: 'tv',
      watch: 'watch',
  }
  
  const devices = [
      {
          title: &quot;My awesome watch&quot;,
          type: deviceTypes.watch,
      },
      {
          title: &quot;My awesome phone&quot;,
          type: deviceTypes.phone,
      }
  ]
  
  const filter = {
      deviceType: [deviceTypes.watch]
  }
  
  </code></pre>
  <p>Now, I want to show devices filtered by <code>deviceType</code> and add to title some text.</p>
  <p>I created a functions:</p>
  <pre><code>const extendTitle = ({item, ...rest}) =&gt; ({ title: `${item.title} - Hello world`, ...rest })
  const filter = filter(({type}) =&gt; filter.deviceType.includes(type))
  
  const filterAndExtendTitle = pipe(
      filter,
      extendTitle
  )
  
  filterAndExtendTitle(devices)
  </code></pre>
  <p>Now, I have a question. How should I  write function if I want to add second an argument with <code>deviceTypes</code> (pure function)?</p>
  <p>I was try...</p>
  <pre><code>const extendTitle = ({item, ...rest}) =&gt; ({ title: `${item.title} - Hello world`, ...rest })
  const filterItemsByType = (filter) =&gt; filter(({type}) =&gt; filter.includes(type))
  
  const filterAndExtendTitle = (filter) = pipe(
      filterItemsByType(filter),
      extendTitle
  )
  
  filterAndExtendTitle(devices)(filter.deviceType) 
  </code></pre>
  <p><strong>... and works fine but I don't know if that practice is good with best practices. I thought about <code>curry</code> function and modifications with that to refactor.</strong></p>