title: Swift Array<Set> How can I map and return true if the $0 set matches another set?
body: <p>I have an array arrCommands and in it there's a few different sets  -
  [["play"], ["play message"], ["play message from"], etc. </p>
  
  <p>I'm using speech recognition to get some user inputted commands, I have an array of the different commands (play, message) etc. and I build a set from the intersection of the array of the words spoken and my tags array. </p>
  
  <p>So, if the user said, "Can you play the message please" I would be able to get ["play", "message"] from the spoken command. I then want to check the arrCommands and see if there's a match between this set and the ones it holds. </p>
  
  <p>I tried doing this: </p>
  
  <pre><code>let isCommand = arrCommands.map { if setTags.isSubset(of: $0) { return true } }
  </code></pre>
  
  <p>But I get this error: <strong>Unable to infer complex closure return type; add explicit type to disambiguate</strong></p>
  
  <p>But adding -> Bool set off a series of error messages. I am sure this is simple and I am just missing it but any help would be great. </p>