What are the advantages of immutable data structures outside functional programming? We explore the benefits of immutability when designing a search query API in Ruby. A data structure is immutable if it cannot be changed after it is created. In a recent Ruby application we decided to use immutability to our advantage. This article explains how. We will look at an interesting property of the API o
![Creating immutable tree data structures in Ruby – Voormedia](https://cdn-ak-scissors.b.st-hatena.com/image/square/45ee6eecf61aa716ad544107caa19b3cc3e17e28/height=288;version=1;width=512/https%3A%2F%2F75d87dnb.tinifycdn.com%2Fimages%2Fthumbs%2Fimmutabletree%2Fimmutabletree-2x-0383390a.jpg)