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

Wouldnt the following work in basic python:

  for a_k in 1 to n:
    for a_(k-1) in 1 to a_k:
    ....
I'm a heavy user of Mma but there are better examples. Automating the rewriting of formulas to make them more concise is a big one. (But also not as straightforward as it could be, tradeoffs between conciseness, ease of reading and speed of implementation need to be triaged, similar to Lisp/APL. Maybe sympy still has a chance to be more like math/TCS)


no because k is an argument and you have to pre-write k nested loops




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: