 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])
 indexOf = uncurry (x) -> (fromIndex) ->
   if typeChecks.isArray fromIndex
     xs = fromIndex

  Array.prototype.splice.apply xs, [index, howMany].concat(ys)
  xs

# arr.toLocaleString()
toLocaleString = (xs) ->
  if typeChecks.isArray xs
    Array.prototype.toLocaleString.call xs
  else
    Object.prototype.toLocaleString.call xs

# arr.toString()
toString = (xs) ->
  if typeChecks.isArray xs
    Array.prototype.toString.call xs
  else
    Object.prototype.toString.call xs

# arr.unshift(element1, ..., elementN)
unshift = curry (x, xs) ->
  concat xs, [x]


    xs = fn
    do slice(0, xs).sort

splice = curry (index, howMany, ys, xs) ->
  ys = switch
    when typeChecks.isArray ys then ys
