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

Functional Data Structures

We are familiar with imperative data structures. In fact, there are lots of references to imperative data structures in different programming languages. In contrast, there aren't many references to declarative data structures or functional data structures. This is because FP languages are not as mainstream as imperative programming languages. Additionally, designing and implementing functional data structures is more difficult in comparison to imperative counterparts because of the following reasons:

  • Mutability is not recommended in FP
  • Functional data structures are expected to be more flexible than their imperative counterparts

Imperative data structures rely heavily on mutability and assignments and making them ...

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