4 ms·
an even more succinct way might be: blocks _ _ True = True blocks Tile{isWater} floats _ = not isWater || floats blocks Creature
by overhero 5y ago
an even more succinct way might be:
blocks _ _ True = True
blocks Tile{isWater} floats _ = not isWater || floats
blocks Creature{} _ _ = True
blocks Fire{} _ _ = False
blocks Wall{} _ _ = True
it does not get much closer to truth-tables, if you ask me