please help me to reverse a function call order
Salih Dincer
salihdb at hotmail.com
Sun Jul 24 15:49:51 UTC 2022
On Sunday, 24 July 2022 at 15:11:45 UTC, Salih Dincer wrote:
> ...But you know this classic recurisive function:
The `permut()` function works with many types, for example
`char`. Look at probability 40: 😀
```d
void main() {
int totalCount;
['a', 'd', 'g', 'l', 'n'].permut(totalCount);
totalCount.writeln(" permutation found...");
} /* Output:
...
dagln: 25
dagnl: 26
dalgn: 27
dalng: 28
danlg: 29
dangl: 30
dgaln: 31
dganl: 32
dglan: 33
dglna: 34
dgnla: 35
dgnal: 36
dlgan: 37
dlgna: 38
dlagn: 39
dlang: 40
dlnag: 41
dlnga: 42
dngla: 43
dngal: 44
dnlga: 45
dnlag: 46
dnalg: 47
dnagl: 48
...
120 permutation found...
Process finished.
```
SDB@
More information about the Digitalmars-d-learn
mailing list