[Question]
  [
Given an integer \$x\_1\$ and some [black box function](https://codegolf.meta.stackexchange.com/a/13706/24877) \$f: ℤ → ℤ\$ find a fixed point of \$f\$ in the sequence defined by \$x\_{k+1} := f(x\_k)\$.
### Details
* A value \$x\$ is said to be a fixed point of \$f\$ if \$x = f(x)\$.
For instance if \$f(x) = \text{round}(\frac{x}{\pi})\$ and we have a starting point \$x\_1 = 10\$ then we get \$x\_2 = f(x\_1) = f(10) = 3\$, then \$x\_3 = f(x\_2) = f(3) = 1\$, then \$x\_4 = f(x\_3) = f(1) = 0\$, and finally \$x\_5 = f(x\_4) = f(0) = 0\$ which means the submission should return \$0\$.
* You can assume that the generated sequence actually contains a fixed point.
* You can use the native type for integers in place of \$ℤ\$.
* You can use any language for which there are defaults for black box functions input in the [standard IO meta post](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods). If there are no such default for your language feel free to add one in the sense of the [definition of black box functions](https://codegolf.meta.stackexchange.com/a/13706/24877), and make sure to link your proposals in that definition. Also don't forget to vote on them.
### Examples
```
f(x) = floor(sqrt(abs(x)))
0 -> 0,  all other numbers -> 1
f(x) = c(c(c(x))) where c(x) = x/2 if x is even; 3*x+1 otherwise
all positive numbers should result in 1,2 or 4 (Collatz conjecture)
f(x) = -42
all numbers -> -42
f(x) = 2 - x
1 -> 1
```
  
[Answer]
# [Actually](https://github.com/Mego/Seriously), 1 byte
```
Y
```
[Try it online!](https://tio.run/##S0wuKU3Myan8f2jx/8j//025lBwfdcx61NmhBAA "Actually – Try It Online")
`Y` is the fixed point function in Actually. In the TIO example, the function is shown being taken as a string, and `£` is used to transform it to a function on the stack. It's also possible to just push the function to the stack [like so](https://tio.run/##S0wuKU3Myan8/6hngeOjjlmPOjse9Sz8H/n/vykA). These are the only two ways to get a function input in Actually.
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 2 bytes
```
⍣=
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT/8PBP6P2iY86l1sy1X9qKdLo@ZR71ZNLT3TWn8FQyNjhUe9cxXccvLzizSKC4tKNBKTihUqNDW5qo10gepAahSgAKTQSLeCq1rXxAgobmxohBAHCgEA "APL (Dyalog) – Try It Online")
**NB:** I define `O←⍣=` in the the input section due to a bug in that derived monadic operators can't be defined in the way that TIO likes to define things.
`⍣` Is an operator that can be used like `(function⍣condition) ⍵`
It applies the `function`, `f`, to `⍵` until `(f ⍵) condition ⍵` returns true.
`⍣=` is a derived monadic operator that takes a monadic function, `f`, as its left argument and applies it to its right argument, `⍵`, until `f ⍵ = ⍵`
[Answer]
## Haskell, 17 bytes
```
until=<<((==)=<<)
```
[Try it online!](https://tio.run/##lcs9D4IwGATg3V9xIQ5UA5EPN@pu4ubKgvhWGkuLbVV@vbWOLibmhrvhuaFzV1IqCN6Gu/ZS8aZJU85ZbBbGTmpwnM0CmKzUHksIpEIZY3N3sz4X1ox77elCNu9ODgybP2y1rT/67o/eHjSS5PvbG@080qwuWbQ/ZR7DUJQVngNZQs/RztlOCtCDNGb4IdZZPuIsQcoRqtW8LsKrF6q7uJD10/QG "Haskell – Try It Online")
[Answer]
# [MATLAB](https://matlab.mathworks.com/), 41 bytes
```
function x=g(f,x);while f(x)-x;x=f(x);end
```
There is also [this beauty](https://tio.run/##FclLCoAgGEXh7dwLNqipCG7FHkoQWRmhSGu3v8kZfCdOt3uW1oKxCLTwKrNaMCtJEBIpfOvQoRiPTGMyX1D/r@l5TQfcnmBl@S3GC@m8brgxCZCqJ3X7AA) that does not need function files. Unfortunately it is a little bit longer:
```
i=@(p,c)c{2-p}();g=@(g,f,x)i(f(x)==x,{@()x,@()g(g,f,f(x))});q=@(f,x)g(g,f,x)
```
[Try it online!](https://tio.run/##y08uSSxL/f8/rTQvuSQzP0@hwjZdI02nQtO6PCMzJ1UhTaNCU7fCusIWxLBOzUv5D8TWKZnFBRrpGg5AMSPdCh1DTU3r/wA "Octave – Try It Online")
[Answer]
# Mathematica, 11 bytes
```
#2//.x_:>#&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7X9lIX1@vIt7KTlntf0BRZl6JQ1q0W05@flF0cGFRSbRjUrFDRWysjkEsFx5ZE6PY/wA "Wolfram Language (Mathematica) – Try It Online")
# Mathematica, 10 bytes
```
FixedPoint
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b73y2zIjUlID8zr@R/QBGQdEiLdsvJzy@KDi4sKol2TCp2UI6NVdMxiOXCJ21iFPsfAA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Standard ML (MLton)](http://www.mlton.org/), 30 bytes
```
fun& $g=if$ =g$then$else&(g$)g
```
[Try it online!](https://tio.run/##bZDNbsMgEITvfopVhCxoFKvGlnqo/AA59JJcq1b4B4KKwbVJxCmvni6oihup4oD2YxhmWEazG4139ibPFlojuq/WhRICNCCNczN9E/5ULN@zp4dBmELObtxbT0W7QGCMZdnfizxd7Ghc8RQyYXvoEtUSt9H1wHF4Bn8aLIJeXxAMZhmgegrb8tGvgk8UX2v@iOtkyHchps6BqEZLAo0i0ZREs5wqwlQqNU2gUT3NGmNj9MK7o8dBIf6AzbvdYImLMOkpmqGe5pjv/hfs9ZfV/B9YVmv5O3xZC6zCNT1jtx8 "Standard ML (MLton) – Try It Online") Use as `& n blackbox`.
The black box functions are defined as following:
```
fun blackbox1 x = floor(Math.sqrt(Real.fromInt(abs x)))
fun blackbox2 x = c(c(c(x))) 
and c x = if x mod 2 = 0 then x div 2 else 3*x+1
fun blackbox3 _ = ~42
fun blackbox4 x = 2-x
```
**Ungolfed version:**
```
fun fixpoint n g = if n = g n then n else fixpoint (g n) g
```
[Answer]
# [R](https://www.r-project.org/), ~~36~~ 35 bytes
*thanks to JayCe for golfing down a byte*
```
function(f,x){while(x-(x=f(x)))0;x}
```
[Try it online!](https://tio.run/##hY5NbsIwEIXX4RSvREh2sVUn7a7NCTiFSW1iyYqDbcQIxNlTkqo/WaHZjPS9983E8YAPOdpT32YXemYF8eu5c94wkoway4hzrt7pNh7Yb4p4LUlUHEVRlLjvqwWUb/UdzqwNfcq6z/jBq13zL7l2ds1os6nF6zNtK0EvNZ9b3ut8@Sst9Ds2zfTXfKVEjm7wBnoYvGv1lEKwDyTWhxBZOsbM9D5922SlOIASqQsn/4m9QQUbIghPDZSAQsidiWeXzGPb7Fra1PgF "R – Try It Online")
[Verify the example functions!](https://tio.run/##hY5NbsIwEIXX4RSvREh2sVUn7a7NCTiFSW1iyYqDbcQIxNlTkqo/WaHZjPS9983E8YAPOdpT32YXemYF8eu5c94wkoway4hzrt7pNh7Yb4p4LUlUHEVRlLjvqwWUb/UdzqwNfcq6z/jBq13zL7l2ds1os6nF6zNtK0EvNZ9b3ut8@Sst9Ds2zfTXfKVEjm7wBnoYvGv1lEKwDyTWhxBZOsbM9D5922SlOIASqQsn/4m9QQUbIghPDZSAQsidiWeXzGPb7Fra1PgF)
R port of [flawr's solution.](https://codegolf.stackexchange.com/a/150189/67312)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~39~~ ~~37~~ 33 bytes
thanks to [@Mr.Xcoder](https://codegolf.stackexchange.com/users/59487/mr-xcoder) for -2 bytes
```
s=lambda k:s(f(k))if k-f(k)else k
```
[Try it online!](https://tio.run/##dcrBCsIwDMbx@54iFyGpVNeol@Ieppsrjs5smF18@rqJsCFILh/5/8bXdB@Ec9aqD4/6FiB5xYiJqIuQ7LLaXltIuWiggi8SL0eGWciO4QoOPuZkZO@KuGUNLidEVIzPTiZQdExbo35@Y6gVlYw5XP5C8fbMayzLn8pW1kr5DQ "Python 2 – Try It Online")
assumes the black-box function to be named f
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~25~~ ~~22~~ 21 bytes
thanks [Herman Lauenstein](https://codegolf.stackexchange.com/users/70894/herman-lauenstein) for showing me [this consensus](https://codegolf.meta.stackexchange.com/a/13707/64121)  
thanks to [@l4m2](https://codegolf.stackexchange.com/users/76323/l4m2) for -1 byte
Assumes the black-box function to be named `f`.
```
g=k=>f(k)-k?g(f(k)):k
```
[Try it online!](https://tio.run/##JcaxDYAgEADAniks/wsMtibgBA6BCKgQXoG4Pka96g5962LyflaeaLWteRmkchCQh8nDGxxDczJJNeu69S4SZfharlz/6aVAQkRmKBWKto/kgXWdh0EIZNge "JavaScript (Node.js) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 3 bytes
```
vÐL
```
[Try it online!](https://tio.run/##y0rNyan8/7/s8ASf////KxnFK/03BAA "Jelly – Try It Online")
Takes the left argument as a string representing a Jelly link (`2_` for instance), and the right argument as an integer
## How it works
```
 ÐL - While the output is unique...
v   -   Evaluate the function with the argument given
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 24 bytes
```
(()){{}(({})<>[({})])}{}
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/X0NDU7O6ulZDo7pW04YLyNPQjK6ujdXksosGCcVq1lbX/v9vCAA "Brain-Flak – Try It Online")
(for the black box function `x -> 2-x` in the example below)
The provided black box function should be a program, that given `x` on the top of the stack, pop `x` and push `f(x)` - in other word, it should evaluate the function `f` on the value on the top of the stack.
Equivalent [Mini-Flak](https://codegolf.stackexchange.com/a/110652) is 26 bytes (thanks to Wheat Wizard for saving 2 bytes):
```
(()){{}(({})( )[{}({})])}{}
             ^ put the function f here
```
(not counting the comments and spaces)
Take the function (inside the `<>`) and a number `x0` from input. (note that Brain-Flak is an esoteric language and can't take functional argument as input)
---
Example blackbox functions:
`x -> 2-x`: [Try it online!](https://tio.run/##SypKzMzTTctJzP7/X0NDU0Mzuro2VvP/fxMA "Brain-Flak – Try It Online")
---
Explanation:
```
(()){{}(({})<f>[({})])}{}   Main program.
                            Implicit input from stdin to stack.
(  )                        Push
 ()                         literal number 1.
                            Now the content of the stack: [1, x0]
    {                 }     While stack top ≠ 0:
                            current stack content: [something ≠ 0, x]
     {}                       Pop stack top (something). stack = [x]
       (             )        Push
        ({})                    Stack top = x. Current stack = [x]
             f                  Evaluate f. Current stack = [f(x)]
            < >                   (suppress the value of f(x), avoid adding it)
               [    ]           plus the negative of
                ({})            the top of the stack ( = -f(x) )
                              In conclusion, this change (x) on the stack to
                              (f(x)), and then push (x + -f(x))
                            If it's 0, break loop, else continue.
                       {}   Pop the redundant 0 on the top.
                            Implicit output stack value to stdout.
```
[Answer]
# [Swift](https://swift.org), ~~47~~ 42 bytes
```
func h(_ n:Int){f(n)==n ?print(n):h(f(n))}
```
Naive approach, assumes that [the black box function is named](https://codegolf.meta.stackexchange.com/a/13707/70894) `f`
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 40 bytes
```
f(n,b)int(*b)(_);{n=n^b(n)?f(b(n),b):n;}
```
[Try it online!](https://tio.run/##ZY/RasMwDEXf@xUiMCqPCJo2ZbDQ7TP2UjYcr24NjtLZDhRKfn2evTG6ZHqR0D2SrhQdlYpRI5etMBzwvhX4Jpor7/i1RRbPGnNK6iM3Y0wIaC8x54uAK7hDGByD/3ABZevxIkQD4yLrXK//cVSvs/ytd9IwJm0BKc5D8FjoNA870LbvHf7dKQrR/HAujWosVkBPcGf2XJSgcVUmU2KG0HbC0HYCDUGdpMPlnpe31s1CMjo/WW02D5ONuVGmL@eH62qC1dUvNMZPpa08@ki2i/TCPZnubI0ygfTAKpie6f2grHQy118 "C (gcc) – Try It Online") Note that the flags are not necessary, they are there to aid with testing the fixpoint function defined above.
This is a function that takes an int `n` and a function pointer `b : int → int`. Abusing the fact that writing to the first variable argument sets the `eax` register, which is equivalent to returning†. Otherwise, this is pretty standard as far as C golf goes. `n^b(n)` checks for the inequality of `n` and the black box applied to `n`. When unequal, it calls the fixpoint function `f` again recursively with the application and black box as arguments. Otherwise, it returns the fixpoint.
†Citation needed, I vaguely remember reading this somewhere and google seems to confirm my suspicions
It declares input with K&R-style parameter typing:
```
f(n, b)
int(*b)(_);
{
    n=n^b(n)?f(b(n),b):n;
}
```
The arcane bit on the second line above declares `b` to be a function pointer that takes an integer parameter—the default type of `_` is assumed to be an integer. Similarly, `n` is assumed to be an integer, and `f` is assumed to return an integer. Hooray for implicit typing?
[Answer]
# [Clean](https://clean.cs.ru.nl), 46 bytes
```
import StdEnv
p x=hd[n\\n<-iterate f x|f n==n]
```
Assumes the function is defined as `f :: !Int -> Int`
It takes the head of the infinite list of applications of `f f f ... x` filtered for those elements where `f el == el`.
[Try it online!](https://tio.run/##DcutDsIwFAZQv6f4JBMVoLkOBAlukiJu@gNN2rtmK6QkPPsuHH9cDixaZv/KAYWTaCp1Xhqm5s/yHio6Pf1NrJWjSS0s3AIi@jdCiOSukXa2g3CAQR@HqfE/Eyr2urmY@bGquVz19BEuya0/ "Clean – Try It Online")
If you want to change the function in the TIO, Clean's lambda syntax is:
`\argument = expression`
*(actually it's far more complicated, but thankfully we only need unary functions)*
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 14 bytes
```
{⍵=⍺⍺⍵:⍵⋄∇⍺⍺⍵}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT/@f9qhtQvWjni6Nmke9WzW1Dm83qv2fBxbr3Wr7qHcXGG21AuJH3S2POtrhQrX//6cp5CkYcIFIQzBpCiaNjMGUiRGUMgAA "APL (Dyalog Unicode) – Try It Online")
The function at the header is equivalent to `f(x) = floor(sqrt(abs(x)))`
Thanks @Adám for pointing out that the original answer wasn't valid according to PPCG consensus.
### How it works:
```
{⍵=⍺⍺⍵:⍵⋄∇⍺⍺⍵} ⍝ Main 'function' (this is actually an operator)
      :         ⍝ if
 ⍵=⍺⍺⍵          ⍝ the right argument (⍵) = the left function (⍺⍺, which is f) of ⍵
       ⍵        ⍝ return ⍵
        ⋄       ⍝ else
         ∇⍺⍺⍵   ⍝ return this function (∇) with argument f(⍵)
```
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 37 bytes
```
function x=g(f,x);while x-(x=f(x))end
```
[Try it online!](https://tio.run/##y08uSSxL/f8/rTQvuSQzP0@hwjZdI02nQtO6PCMzJ1WhQlejwjZNo0JTMzUv5T8QW6dkFhdopGs4AMWMdCt0DDU1rf8DAA "Octave – Try It Online")
Octave has inline assignment but MATLAB doesn't, so this is a golfier Octave port of [flawr's solution](https://codegolf.stackexchange.com/a/150189/67312).
It also [ports nicely to R](https://codegolf.stackexchange.com/a/150195/67312).
[Answer]
# [Kotlin](https://kotlinlang.org), 50 bytes
```
{f,k->var a=k;var b=a+1;while(b!=a){b=a;a=f(a)};a}
```
[Try it online!](https://tio.run/##XYm9DsIgFIV3n@K6XWJJ2sapCImjs09wm0glRTSANYbw7AirZzh/3/qM1riykYUwIV5cZFxV76BV4KolyJJ0t3K1kQeSq2g5SzoM4nM39obzXhJL9REkNRLLgnLRbwcPMg7JL2GCs/f0PV2jN25RLO2g6lVHtA4DppGbmDsYGPsn/Dg20PcV5fID "Kotlin – Try It Online")
[Answer]
# [Forth](http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/) (gforth), 36 bytes
This version just assumes `f` is predefined. It's not as cool as the solution below it. Both programs exit with a stack overflow if not found, or a stack underflow if found (after printing the result).
[**Try it online**](https://tio.run/##S8svKsnQTU8DUf9jFFJS0zLzUhXSuKwU0hSMFIrLEwsUdBWsubhiFApKizMUKh41NXIZ/rdSSFdIKS0AqskvSy1SsFXwdFPQUwjxcPVTKEpNLi0qTlWw/p/@HwA)
```
: g dup f over = IF . THEN recurse ;
```
---
## Forth (gforth), 52 bytes
This allows a function's execution token to be passed as a parameter, and is definitely the cooler solution.
```
: g 2dup execute rot over = IF . THEN swap recurse ;
```
[**Try it online**](https://tio.run/##PY2xCsIwFEX3fMXdqkMFO7Y4Kro4dewi9r2kCElIXmxW/VR/JFYKTpfDOXDZBTG15t@UASPxZAmsWjAaxPnmUaNTaoBP0SB/3i@1/6OYpa0ismBDme5JJmch7kF2qypwaaHRjMljtYTgBO5JAQdcTtihPx@v601YghAJXdHlCw)
### Explanation:
```
: g             \ x1 f          Define g. Params on the stack. f is on top
2dup execute    \ x1 f x2       duplicate both params, execute f(x1)
rot over        \ f x2 x1 x2    move x1 to top and copy x2 to top
= IF . THEN                     compare, if equal, print
swap recurse ;                  otherwise, recurse
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~31~~ 28 bytes
```
->x,f{x=f[x]until x==f[x];x}
```
[Try it online!](https://tio.run/##KypNqvyfbvtf165CJ626wjYtuiK2NK8kM0ehwhbMsa6o/V9QWlKskB5tqANUVW2kW1Eby5VsC2JXqBrZ2hrYV@gbWRlrVWgb1nJBlRYl5qVoGBoYGGjqKIAUJkeDYEVsbGxt7H8A "Ruby – Try It Online")
[Answer]
# [tinylisp](https://github.com/dloscutoff/Esolangs/tree/master/tinylisp) repl, 28 bytes
```
(d P(q((x)(i(e(f x)x)x(P(f x
```
Assumes that the function `f` is predefined.
[Try it online!](https://tio.run/##TYxBCoAwDATvecUeNzc9@I9@QdBCoIilHurrY1sUTC6zmyGXHXeycrpzQ2Amq9K4M6JqW4ZOrmNEmhQFzOieADQwgStq0zFPvfviwPI/vj8CFvUH "tinylisp – Try It Online") (The example function is `f(x) = (x*2) mod 10`.)
### Ungolfed
```
(load library)
(def P
 (lambda (x)
  (if (equal? (f x) x)
   x
   (P (f x)))))
```
If `f(x)` equals `x`, then `x` is a fixed point; return it. Otherwise, recursively look for a fixed point starting from `f(x)` instead of `x`.
[Answer]
# APL NARS 65 chars
```
r←(f v)n;c
   c←0⋄→B
E: r←∞⋄→0
A: n←r
B: r←f n⋄c+←1⋄→E×⍳c>1e3⋄→A×⍳r≠n
```
v operator would return ∞ (or possibly -oo or Nan) for error, else one value x with x=f(x).
In test f=floor(sqrt(abs(x))), f1=2-x, f2=c(c(c(x))) with c=x%2==0?x/2:3\*x+1
```
  f←⌊∘√∘|
  f v 0
0
  f v 9
1
  f1←{2-⍵}
  f1 v 1
1
  f1 v ¯10
∞
  f1 v 2
∞
  c1←{0=2∣⍵:⍵÷2⋄1+3×⍵}
  f2←c1∘c1∘c1
  f2 v 1
1
  f2 v 2
2
  f2 v 7
2
  f2 v 82
4
```
[Answer]
## Clojure, ~~45~~ 43 bytes
Well, this is the shortest and ugliest:
```
#(loop[a + b %2](if(= a b)a(recur b(% b))))
```
`+` is there instead of a number so that it is not equal to any value of `x0`.
55 bytes and functional:
```
#(reduce(fn[a b](if(= a b)(reduced a)b))(iterate % %2))
```
Example:
```
(def f #(...))
(defn collaz [x] (if (even? x) (-> x (/ 2)) (-> x (* 3) (+ 1))))
(f (->> collaz (repeat 3) (apply comp)) 125)
; 1
```
[Answer]
# Java 8, 42 bytes
This takes a `Function<Integer, Integer>` or `IntFunction<Integer>` and an `int` or `Integer` (curried) and returns the fixed point.
```
f->i->{while(i!=(i=f.apply(i)));return i;}
```
[Try It Online](https://tio.run/##jU9NS8QwED23v2L2lqINelqwpouXBQ@isHoSD9k2rVPTJCTT1bL0t9eIRVD24GFm3ny/18mDzK1TpqvfZjfsNVZQaRkC3Ek0cEyTpRhIUgwNGqmhi1t8INS8GUxFaA3fLuD6RO/W0E87YtUqX57D6cEnI/1475SXZH0JraItfqj6waIhEHOTl5iXx/dX1IrhSjAUDZfO6ZFhlmWFVzR4A1hMc1Kkf9kfLNbQR2FsRx5N@/wC0rch@9KZ/JM4eNm7R7sGAQh5GZ0QsIZNtKuYnMFlEY/txkCq53Yg7uIn0ob9krJwXm5l3@lNiE/YRZSRJlM6zZ8)
Takes advantage of the fact that Java evaluates subexpressions from left to right (so the old `i` is compared to the new), a property which I was unaware of while writing this!
[Answer]
# x86 opcode, 8 bytes
```
fun:
        call    edx          ; 2B
        cmpxchg eax,    ecx  ; 3B, on 8086 use xchg and cmp instead
        jnz     fun          ; 2B
        ret                  ; 1B
```
Take input: `ecx` (value `x0`), `edx` (function address, take input from `ecx`, write result to `eax` without modifying the value of `ecx` and `edx`)
# 8086 opcode, 7 bytes (but slow)
```
    xor     cx,     cx
    call    dx
    loop    $-2
    ret
```
If there exists a fixed point, looping 65536 times always drive it there.  
Take input: `ax` (initial value `x0`), `dx` (function address, take input from `ax`, write output to `ax` without modifying the value of `cx` and `dx`).  
Output the fixed point in register `ax`.
[Answer]
# [J](http://jsoftware.com/), 3 bytes
```
^:_
```
[Try it online!](https://tio.run/##PY9BT4QwEIXv8ysmJKZUgbSFC9U1JCaePHl30RCaXd3IsqwGE@Nfx3mVCAde@948vnldkkKNvPGsMsOeTV7cPT7cL1vfLpooHIbhBPemoGk8nSEvPO1eDgEy9zTj@0T7qf/s36ENb9jxN89EHc6pvSovZ/2Mmab4y0mxhRfrGxRTcLjotr6kUEK2lUsMhQracY6@cz9FAgtQYg5HnD54FN13u4GVV9kPq5DOWihUJjDHfffGX2ugSRXLdeIzxfltVE046sQI5ZrU/12KdOSMf5VSsKZglXatrqXbsjXygH0NdSle8RGwpuSaq7jQ6ueVi5PR4FbGuba1q7DnGom7Ynr5BQ "J – Try It Online")
When a conjunction in J is missing an operand, it becomes an adjective. This program produces an adjective which takes as an argument a verb. `^:` is the *power* or "repeat" verb, and the idiom `f^:_`, that is, `f` repeated infinitely, is J's [*limit application*](https://www.jsoftware.com/help/dictionary/d202n.htm), which exactly solves this challenge:
> 
> An infinite power `n` produces the limit of the application of `u` .
> 
> 
> 
[Answer]
# [dc](https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html), 30 bytes
```
[pq][Smrd3Rd3Rxd3R=mLmlmx]dsmx
```
[Try it online!](https://tio.run/##S0n@Hx1roKCcmZKaV5JZUqmglFaal1ySmZ@npJCYl6JQlVqU/z@6oDA2Oji3KMU4CIgqgNg21yc3J7ciNqU4t@L/fwA "dc – Try It Online")
Takes as input the function in the form of a macro and initial value on the stack(pushed in that order). Prints the fixed point.
[Answer]
# Perl 5, 18 + 1 (`-p`)
```
$_=f$_ while$_^f$_
```
[try it online](https://tio.run/##K0gtyjH97@Tq7ulXXVyapJBWnZlXomeqrRIfbRCrb6xnaFJb@18l3jZNJV6hPCMzJ1UlPg7I/v/f0OBffkFJZn5e8X/dAgA)
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 1 byte
```
Ẋ
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLOuzIkLTtcbjEiLCLhuooiLCIiLCIiXQ==)
Builtin lol
[Answer]
# [J-uby](https://github.com/cyoce/J-uby), 3 bytes
J-uby has a built-in operator for this:
```
:!~
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m700K740qXLBIjfbpaUlaboWi60U6yCsm1ppCrYKunYV1QoaFfq-iSUZVlYBnpp6RfmleSkKtVxcBQpuehppOgqGBpoQHQsWQGgA)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 14 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
gOvV
¥W?U:ßW
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=CgpnT3ZWCqVXP1U631c&input=MTQyMzU0NgoiQFhhIHEgZn0i)
Japt doesn't have any built-in "repeat until the output is constant" functionality, or the ability to take functions directly as input. This program takes `x` as the first input, and a string defining a Japt function as the second input.
Explanation:
```
/n      # Store first input as U
/n      # Store second input as V
gOvV
 OvV    # Interpret V as Japt code
g       # Apply that function to U
        # Store the result as W
¥W      # Check whether U and W are the same
  ?U    # If they are, output U
    :ßW # Otherwise repeat the program with W and V as the inputs
```
A [theoretical alternative](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=pWdWID9VOt9VZ1Y&input=MTQyMzU0NgoiQFhhIHEgZn0i) would work if the function were assumed to already be stored in V, but there isn't really a good way to actually accomplish that in Japt so it's not really a reasonable input method.
]