     toString.call(obj) == '[object Array]'
 
 
-toPos = (posOrID) ->
-    return if isArray(posOrID) then posOrID else @position[posOrID]
+toPos = (posid) ->
+    return if isArray(posid) then posid else @position[posid]
 
 
 class Sliding


        return @

    solvable: (pos) ->
        [erow, _] = @position[@emptyID]
        [inversions, _] = countInversions(@grid, @emptyID)
        return solvable(inversions, @rows, @cols, erow + 1)


        return @

    slide: (posid, handler) ->
        if not @slidable(posid)
            return @
        [row, col] = toPos.call(@, posid)
        [erow, ecol] = @position[@emptyID]
        if row == erow
            handler?.call(@, @grid[row][c], @emptyID)
