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

Then you can mix-and-match:

    const activePlayers = 
      players
      |> filter(x => x.isAlive)

    const highestScore = 
      activePlayers
      |> map(x => x.score)
      |> tryMax
In any case, I don't see how being restricted to always using an intermediary variable for every step is an advantage.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: