Hacker News new | past | comments | ask | show | jobs | submit login

Well I had to try this "Man or Boy" test. I do get -67 :-)

    fn A(k, &x1, &x2, &x3, &x4, &x5) {
            fn B() {
                    k = k - 1
                    return A(k, B(), *x1, *x2, *x3, *x4)
            }
            if k <= 0 {
                    return *x4 + *x5
            } {
                    return B()
            }
    }

    print A(10, 1, -1, -1, 1, 0)
Only a few languages can do this without some form of explicit wrappers in the top-level call to A.



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

Search: