Functional Data Structures

Let’s examine some of the core differences between OOP and functional programming.

Writing data structures functionally

Let’s keep exploring our bank account example. Here’s one way to think about it:

account:
%{
     account_number: String, 
     account_holder: %User{},
     balance: Int, 
     transaction_log: [strings],
 }

Get hands-on with 1200+ tech skills courses.