|n> as notation for function piping n times?

Toying with it a bit…

julia> |>ⁿ(x, (f, n)) = foldl(|>, Iterators.repeated(f, n); init=x)
|>ⁿ (generic function with 1 method)

julia> 3 |>ⁿ (sqrt, 4)
1.0710754830729146
2 Likes