This source has a paragraph Setting a Default Property Value with a Closure or Function where we can find an example
Here’s a skeleton outli
This is a known problem in the Swift compiler. The issue is that once you use closures or lazy properties like this, every single Swift file will be type checked. I've written a blog post on this topic which you can find here.