Hacker News new | past | comments | ask | show | jobs | submit login

Perhaps you want the Haskell zipWith function? It takes two lists and, instead of zipping them together -- i.e., applying the tuple constructor (,) -- it lets you apply an arbitrary function.

I think from your python, you want the first element of A to be 0? (Python is not my best language.) Thus in Haskell,

    a = 0 : zipWith (+) b c



Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: