I want to solve the following exercise 1.3.C. from page 27 of R. Engelking: General Topology.
For every positive integer $n$ the $n$-th derived set $A^{(n)}$ of a subset $A$ of a topological space $X$ is defined inductively by the formulas: $$ A^{(1)} = A^d \quad \textrm{and} \quad A^{(n)} = (A^{(n-1)})^d. $$ (a) Give an example of a set of real numbers that has three consecutive derived sets distinct from each other.
(b) Give an example of a set of real numbers that has infinitely many derived sets distinct from each other.
The definition is $$ A^d := \{ x \in X \mid x \in \overline{A \setminus \{ x \}} \}. $$ I am confused, cause the set $A^d$ ist closed, i.e. $\overline{A^d} = A^d$. And closed means it already contains all its limit points, so how can then $(A^d)^d$ be different from $A^d$?