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

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.



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

Search: