Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
7
Task/Ackermann-function/Rust/ackermann-function-2.rust
Normal file
7
Task/Ackermann-function/Rust/ackermann-function-2.rust
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fn ack(m: u64, n: u64) -> u64 {
|
||||
match (m, n) {
|
||||
(0, n) => n + 1,
|
||||
(m, 0) => ack(m - 1, 1),
|
||||
(m, n) => ack(m - 1, ack(m, n - 1)),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue