Comment by mrsmrtss
5 days ago
When using switch expression in C#, they are a lot more similar:
public int Fib(int n) => n switch
{
<= 1 => n,
_ => Fib(n - 1) + Fib(n - 2)
};
5 days ago
When using switch expression in C#, they are a lot more similar:
public int Fib(int n) => n switch
{
<= 1 => n,
_ => Fib(n - 1) + Fib(n - 2)
};
No comments yet
Contribute on Hacker News ↗