Source Academy Modules
    Preparing search index...

    Function repeat_pattern

    • Applies a given function n times to an initial value

      Parameters

      • n: number

        A non-negative integer

      • pattern: (a: string) => string

        Unary function from Rune to Rune

      • initial: string

        The initial Rune

      Returns string

      • Result of n times application of pattern to initial: pattern(pattern(...pattern(pattern(initial))...))