Zulip Chat Archive

Stream: Is there code for X?

Topic: Repeated Function Composition


Shimon Schlessinger (Aug 08 2022 at 22:30):

I can't find in the documentation how to repeatedly compose a function in the documentation.
For example, there is no way to rewrite

(f  f  f ) x = (f ^ 3)  x --or maybe in some other notation because the RHS is interpreted as (f x) ^ 3

and no already defined way for arbitrarily many compositions.
Does this type of thing already exist?

Adam Topaz (Aug 08 2022 at 22:32):

The notation is f ^ [37] x

Junyan Xu (Aug 08 2022 at 22:34):

docs#nat.iterate
It would be nice if notation declarations show up in the docs.

Eric Wieser (Aug 08 2022 at 22:36):

^ 3 works too if you use docs#function.End


Last updated: Dec 20 2023 at 11:08 UTC