text: import { equals } from './equals'
  
  /**
   * Returns the position of the last occurrence of an item in an array, or -1 if
   * the item is not included in the array.
   *
   * @func
   * @category List
   * @sig a -> [a] -> Number
   * @param {*} target The item to find.
   * @param {Array} list The array to search in.
   * @return {Number} the index of the target, or -1 if the target is not found.
   * @example
   *
   *      R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6
   *      R.lastIndexOf(10, [1,2,3,4]); //=> -1
   */
  export function lastIndexOf(target, list){
    if (arguments.length === 1) return _list => lastIndexOf(target, _list)
  
    let index = list.length
  
    while (--index > 0){
      if (equals(list[ index ], target)){
        return index
      }
    }
  
    return -1
  }
  