The present invention provides compounds of formula (I): compositions comprising such compounds the use of such compounds in therapy (for example in the treatment or prevention of a disease or condition in which plasma kallikrein activity is implicated) and methods of treating patients with such compounds wherein R5, R6, R7, A, B, W, X, Y and Z are as defined herein.