Companies are finally taking technology seriously. And judging by M&S’s stunning results, it is paying off