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

It appears to have an error on slide 23, where the flatMap should return 1, -1 at the beginning rather than 1, -2?

I don't know enough Scala to say with certainty but that seems to be an error:

Seq(1,2,3,4) flatMap { x => Seq(x, -x) } == Seq(1,-2,2,-2,3,-3,4,-4)



Yeah you're right.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: