3 ms·
A function has the structure INPUT -> FUNCTION -> OUTPUT. Let's say you're adding a widget to the database: (DATABASE,NEW_WIDGET) -> FUNCTION -> (NEW_DATABASE)
by drcode 10y ago
A function has the structure INPUT -> FUNCTION -> OUTPUT. Let's say you're adding a widget to the database: (DATABASE,NEW_WIDGET) -> FUNCTION -> (NEW_DATABASE)
The only efficient way to return a brand new database that is the same as the old database plus 1 new widget is via immutable data structures.