Typed Attributes and Composite Types for Functional Programming in Ruby