   constructor: (name) ->
     @name = if name.compile then name else new Literal name
 
-  assigns: (name) -> 
+  assigns: (name) ->
     @name.assigns name
 
-  compile: (o) -> 
+  compile: (o) ->
     if @index? then @compileParam o else @name.compile o
 
   # Utility function that converts arbitrary number of elements, mixed with
-  # splats, to a proper array
-  @compileSplattedArray: (list, o) ->
-    args = []
-    end  = -1
-    for arg, i in list
-      code = arg.compile o, LEVEL_LIST
-      prev = args[end]
-      if arg not instanceof Splat
-        if prev and starts(prev, '[') and ends(prev, ']')
-          args[end] = "#{prev.slice 0, -1}, #{code}]"
-          continue
-        if prev and starts(prev, '.concat([') and ends(prev, '])')
-          args[end] = "#{prev.slice 0, -2}, #{code}])"
-          continue
-        code = "[#{code}]"
-      args[++end] = if i is 0 then code else ".concat(#{code})"
-    args.join ''
+  # splats, to a proper array.
+  @compileSplattedArray: (o, list, apply) ->
+    index = -1
+    continue while (node = list[++index]) and node not instanceof Splat
+    return '' if index >= list.length
+    if list.length is 1
+      code = list[0].compile o, LEVEL_LIST
+      return code if apply
+      return "#{ utility 'slice' }.call(#{code})"
+    args = list.slice index
+    for node, i in args
+      code = node.compile o, LEVEL_LIST
+      args[i] = if node instanceof Splat
+      then "#{ utility 'slice' }.call(#{code})"
+      else "[#{code}]"
+    return args[0] + ".concat(#{ args.slice(1).join ', ' })" if index is 0
+    base = (node.compile o, LEVEL_LIST for node in list.slice 0, index)
+    "[#{ base.join ', ' }].concat(#{ args.join ', ' })"
 
 #### While
 

    parts.reverse() if @flip
    parts.join ''

  toString: (idt) -> 
    super idt, @constructor.name + ' ' + @operator

#### In


  makeReturn: THIS

  compileNode: (o) ->
    @tab + '/*' + multident(@comment, @tab) + '*/'

#### Call
