Example. Higher-order functions [isa-001S]

primrec rpt :: ‹('a ⇒ 'a) ⇒ nat ⇒ 'a ⇒ 'a› where ‹rpt f 0 x = x › | ‹rpt f (Suc n) x = f (rpt f n x)›

The above function is given another function as an input.