Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)
    };


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: