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

LISP-style languages are a pain to read, but it's purely mechanical: everything's in "polish notation", (function arg1 arg2), even when function is something that we would want to think of as an operator or an accessor method. So in Scala I'd write that function as:

    def want-protection(game) =
      game.player.protection < 3 &&
      game.player.xplvl < 15


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

Search: