The aim of the paper is to analyze the different approaches to anaphora with the restricted quantifiers. An important point is distinguishing the anaphoric process, which is in fact structured, from the outcomes of that process. The requirements which we put on anaphora (referential dependence and extensional identity of semantic values of antecedent and anaphoric expressions, together with preserving the meaning of analyzed sentences) cannot be met by equipping the classical semantic theories of anaphora (e.g. the analyses of Keenan or Neale). Anaphora is then explained as an algorithmic process in which the semantic value of the anaphoric expression is a higher-order structured function. This function can also be represented as an algorithm consisting of two main sub-algorithms: a calling procedure of picking up the semantic value of a restricted quantifier (also interpreted as a special kind of algorithm) and an execution procedure containing the semantic value already selected. The result is that the semantic values/structured functions of the anaphoric expressions depend on semantic values of the antecedent expressions without violating the principle of preserving the meaning. Given the identity of the extensional relevant algorithmic parts, also the extensions of these functions are the same.