user
A fixed-point combinator is a higher order function 

fix
{\displaystyle {\displaystyle \operatorname {fix} }}
 that returns the fixed point of its argument function. If the function 

f
{\displaystyle {\displaystyle f}}
 has one or more fixed points, then 

fix
⁡
f
=
f
(
fix
⁡
f
)
{\displaystyle {\displaystyle \operatorname {fix} f=f(\operatorname {fix} f)}}
.

You can extend a fixed-point combinator to find the fixed point of the i-th function out of n given functions: 

fix

i
,
n
⁡

f

1
…

f

n
=

f

i
(

fix

1
,
n
⁡

f

1
…

f

n
)
…
(

fix

n
,
n
⁡

f

1
…

f

n
)
{\displaystyle {\displaystyle \operatorname {fix} \_{i,n}f\_{1}\dots f\_{n}=f\_{i}(\operatorname {fix} \_{1,n}f\_{1}\dots f\_{n})\dots (\operatorname {fix} \_{n,n}f\_{1}\dots f\_{n})}}

Task

Your task is to implement a variadic fixed-point combinator 

fix

∗
{\displaystyle {\displaystyle \operatorname {fix} ^{\*}}}
 that finds and returns the fixed points of all given functions: 

fix

∗
⁡

f

1
…

f

n
=
⟨

fix

1
,
n
⁡

f

1
…

f

n
,
…
,

fix

n
,
n
⁡

f

1
…

f

n
⟩
{\displaystyle {\displaystyle \operatorname {fix} ^{\*}f\_{1}\dots f\_{n}=\langle \operatorname {fix} \_{1,n}f\_{1}\dots f\_{n},\dots ,\operatorname {fix} \_{n,n}f\_{1}\dots f\_{n}\rangle }}

The variadic input and output may be implemented using any feature of the language (e.g. using lists).

If possible, try not to use explicit recursion and implement the variadic fixed-point combinator using a fixed-point combinator like the Y combinator.

Also try to come up with examples where 

fix

∗
{\displaystyle {\displaystyle \operatorname {fix} ^{\*}}}
 could actually be somewhat useful.

Related tasks

* Y combinator
* Variadic function

See also

* Mayer Goldberg: A Variadic Extension of Curry’s Fixed-Point Combinator
assistant
**Translation of**: Julia

**Translation of**: Python

```
# 20240726 Raku programming solution

my &Y = -> \a { a.map: -> \f { -> &x { -> { x(Y(a)) } }(f) } }
             
my \even_odd_fix = -> \f { -> \n { n == 0  or f[1]()(n - 1) } },
                   -> \f { -> \n { n != 0 and f[0]()(n - 1) } };

my \collatz_fix = -> \f { -> \n, \d { n == 1 ?? d !! f[(n % 2)+1]()(n, d+1) } },
                  -> \f { -> \n, \d { f[0]()( n div 2, d ) } }, 
                  -> \f { -> \n, \d { f[0]()(   3*n+1, d ) } };

my \even_odd = Y(even_odd_fix).map: -> &f { f() }; # or { $_() }
my &collatz  = Y(collatz_fix)[0]();

for 1..10 -> \i {
   my ( \e, \o, \c ) = even_odd[0](i), even_odd[1](i), collatz(i, 0);
   printf "%2d: Even: %s  Odd: %s  Collatz: %s\n", i, e, o, c
}

```

You may Attempt This Online!