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

Excellent. I also would have accepted

    Violence.hs:5:35:
        No instance for (Shootable BodyPart) arising from a use of 'shoot'
        Possible fix: add an instance declaration for (Shootable BodyPart)
        In the expression: shoot $ user ^. foot
        In an equation for 'violence': violence user = shoot $ user ^. foot



You should abstract this; you realize bullets are group actions on the set of feet, right?

Edit: Sorry, not group actions, monoid actions. Group actions would mean there was some kind of inverse bullet. Also note that bullets aren't commutative.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: