Re:F (2006)
by DylanDmitri on Friday August 21, 2020 @08:43PM
(#24240539)
In loopless Python:
Slower than J by a factor of 2-3, but still 10x faster than grep:
This would make a good Rosetta Code prompt.
[ Parent
| on HN ]
Re:F (2006)
by throwaway_pdp09 on Saturday August 22, 2020 @04:02AM
(#24242541)
I didn't know you could simply open a file and setify it. Interesting. & neat.
Re:F (2006)
by fennecfoxen on Saturday August 22, 2020 @08:06AM
(#24243566)
You can setify any iterable. File handles are iterables that return a line at a time. Tada!
Re:F (2006)
by throwaway_pdp09 on Saturday August 22, 2020 @08:58AM
(#24243818)
> File handles are iterables...
I did not know that. Assumed you had to somehow wrap them first. Very useful, thanks!
this is cheeky, I like it