Site hosted by Angelfire.com: Build your free website today!
; replace old-atom with new-atom thoughout list

; function replace-it (list, old-atom, new-atom) {
;   if (empty(list)) return list;  // return null character
;   else {
;     if (list.position(1) = old-atom) return (new-atom + replace-it(list.substring(2,list.length)));
;     else return (new-atom + replace-it(list.substring(2,list.length)));
;    }
;  }