Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
hn92726819
25 days ago
|
parent
|
context
|
favorite
| on:
Transpiler, a Meaningless Word (2023)
> We can make it a bit more terse using list comprehensions:
import functools as ft def fact(n): lst = range(1, n) return ft.reduce(lambda acc, x: acc*x, lst)
Amusing that there's not a list comprehension in sight.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: