Why decrement hp is a pure function if it modifies input argument -
const decrementHP = p => p.set('hp', p.get('hp') - 1);
For it to be pure shouldn't it at least copy the map content before changing the value? If you run this in multithreaded env you will get a lot of troubles.