News for hackers. Stuff that matters.
Re:Peter Norvig's “pytudes” for Advent of Code 2020 by philshem on Friday January 08, 2021 @03:50AM (#25682863)
when I saw the first() function, I thought it was some default python that was new to me.

But he defines it above in his commonly used functions:

    def first(iterable, default=None) -> object:
        "Return first item in iterable, or default."
        return next(iter(iterable), default)
Re:Peter Norvig's “pytudes” for Advent of Code 2020 by madhadron on Friday January 08, 2021 @01:19PM (#25687805)
How to tell he's a Lisper. :) Be glad it wasn't car().
Re:Peter Norvig's “pytudes” for Advent of Code 2020 by norvig on Friday January 08, 2021 @02:05PM (#25688661)
madhadron, I'm a Common Lisper, so I'm good with `first` and `rest`.