     Object.prototype.toString.call xs
 
 # arr.unshift(element1, ..., elementN)
-unshift = uncurry (x) -> (xs) ->
+unshift = curry (x, xs) ->
   concat xs, [x]
 
 module.exports = { length, concat, every, filter, forEach, indexOf, join,

    do slice(0, xs).sort

# array.splice(index , howMany[, element1[, ...[, elementN]]])
splice = uncurry (index) -> (howMany) -> (ys) -> (xs) ->
  ys = switch
    when typeChecks.isArray ys then ys
    when ys is null then []

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])
