O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Closure of operations

Closure of operations illustrates yet another example of coercing composition and structure upon object-oriented designs.

Essentially, closure simplifies reasoning about a problem by restricting the domain of the discourse. The example of a functional implementation of a domain exhibits this characteristic at a fundamental level. The operation of applying a domain event is closed under the set of domain states. In terms of persistence, this naturally translates to event- sourcing, but also supports persistence in a key-value store or ORM with no required modification.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required