{"action":"created","issue":{"url":"https://api.github.com/repos/alskipp/Swift-Adventures-In-Monad-Land/issues/3","labels_url":"https://api.github.com/repos/alskipp/Swift-Adventures-In-Monad-Land/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/alskipp/Swift-Adventures-In-Monad-Land/issues/3/comments","events_url":"https://api.github.com/repos/alskipp/Swift-Adventures-In-Monad-Land/issues/3/events","html_url":"https://github.com/alskipp/Swift-Adventures-In-Monad-Land/issues/3","id":115707768,"number":3,"title":"1a_I_See_No_Nil.playground, optToString compiler warning","user":{"login":"Leglaw","id":508239,"avatar_url":"https://avatars.githubusercontent.com/u/508239?v=3","gravatar_id":"","url":"https://api.github.com/users/Leglaw","html_url":"https://github.com/Leglaw","followers_url":"https://api.github.com/users/Leglaw/followers","following_url":"https://api.github.com/users/Leglaw/following{/other_user}","gists_url":"https://api.github.com/users/Leglaw/gists{/gist_id}","starred_url":"https://api.github.com/users/Leglaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leglaw/subscriptions","organizations_url":"https://api.github.com/users/Leglaw/orgs","repos_url":"https://api.github.com/users/Leglaw/repos","events_url":"https://api.github.com/users/Leglaw/events{/privacy}","received_events_url":"https://api.github.com/users/Leglaw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-08T03:45:55Z","updated_at":"2015-12-27T14:43:02Z","closed_at":"2015-12-27T14:43:02Z","body":"Using Swift 2.1,\r\n```swift\r\nlet v = split(value) { $0 == \"(\" || $0 == \")\" }\r\n```\r\nCompiler complains:\r\n`Cannot invoke 'split' with an argument list of type '(String, (String) -> Bool)'`"},"comment":{"url":"https://api.github.com/repos/alskipp/Swift-Adventures-In-Monad-Land/issues/comments/167418351","html_url":"https://github.com/alskipp/Swift-Adventures-In-Monad-Land/issues/3#issuecomment-167418351","issue_url":"https://api.github.com/repos/alskipp/Swift-Adventures-In-Monad-Land/issues/3","id":167418351,"user":{"login":"alskipp","id":399265,"avatar_url":"https://avatars.githubusercontent.com/u/399265?v=3","gravatar_id":"","url":"https://api.github.com/users/alskipp","html_url":"https://github.com/alskipp","followers_url":"https://api.github.com/users/alskipp/followers","following_url":"https://api.github.com/users/alskipp/following{/other_user}","gists_url":"https://api.github.com/users/alskipp/gists{/gist_id}","starred_url":"https://api.github.com/users/alskipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alskipp/subscriptions","organizations_url":"https://api.github.com/users/alskipp/orgs","repos_url":"https://api.github.com/users/alskipp/repos","events_url":"https://api.github.com/users/alskipp/events{/privacy}","received_events_url":"https://api.github.com/users/alskipp/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T14:43:02Z","updated_at":"2015-12-27T14:43:02Z","body":"Since Swift 2, most functions have become methods. Also `String` is no longer a `CollectionType` which introduces further complication. The following works, but it involves a fair amount of work.\r\n\r\n```swift\r\nlet value = \"(one)(two)(three)\"\r\nlet v = value.characters.split { $0 == \"(\" || $0 == \")\" }\r\nprint(v.map(String.init)) // [\"one\", \"two\", \"three\"]\r\n```\r\n\r\nIncidentally the project has just been updated to Swift 2.1, so all Playgrounds should all work as expected now."}}