     (xs) -> xs.lastIndexOf x, fromIndex
 
 # arr.map(callback[, thisArg])
-map = uncurry (fn) -> (xs) ->
+map = curry (fn, xs) ->
   xs.map fn
 
 # arr.pop()

  concat [x]

# arr.reduce(callback,[initialValue])
reduce = uncurry (fn) -> (initial) -> (xs) ->
  if initial is null
    xs.reduce fn
  else
    xs.reduce fn, initial

# arr.reduceRight(callback[, initialValue])
reduceRight = uncurry (fn) -> (initial) -> (xs) ->
  if initial is null
    xs.reduceRight fn
  else

uncurry    = require './uncurry'
curry      = require './curry'
typeChecks = require './typechecks'

length = (xs) ->
  xs.length

# arr.concat(value1, value2, ..., valueN)
concat = curry (ys, xs) ->
  xs.concat ys

# arr.every(callback[, thisArg])
every = curry (fn, xs) ->
  xs.every fn

# arr.filter(callback[, thisArg])
filter = curry (fn, xs) ->
  xs.filter fn

# arr.forEach(callback[, thisArg])
forEach = curry (fn, xs) ->
  xs.forEach fn

# arr.indexOf(searchElement[, fromIndex])
