replace = items n item + replaced ->
  for items i current ->
    if (i = n) ->
      attach replaced item
    else
      attach replaced current
    ;
  ;
_
  items : A|L : <T>
  replaced : A|L : T : [items]
;