All the replication functions are defined on the same level and get defined whenever one calls `replicate`, which is ok I think, because it is not inside a loop.