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

I did this same thing in Clojure a while back as a way to introduce myself to the language. As you can see in the card definitions from that [1], I arrived at something close to your proposed idiom. All spells and battlecries are functions of the game state that usually end up being described as the composition of basic actions in hearthstone, e.g. (target [:type]) (damage-target n).

1. https://github.com/Mischanix/soot/blob/master/src/soot/cards...



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: