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

It's a bit of a generic issue. Until tail becomes a norm, it's hard to understand. I found embedded test/examples pretty great to quickly get the meaning of an idiom.

in python for instance:

    def tail(l):
        '''
        >>> tail([1,2,3])
        >>> [2,3]
        >>> tail([])
        >>> ValueException("undefined on []")
        '''
        # actual logic


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

Search: