type Id = Nat32;
type Post = {
creater : Text;
title : Text;
content : Text;
};
let posts = Map.HashMap<Id, Post>(
0,
Nat32.equal,
func(a : Nat32) : Nat32 { a },
);
Map.HashMap<Id, Post>(
0,
Nat32.equal,
func(a : Nat32) : Nat32 { a },
what does this Map actually do, there’s not many examples, also what is the best way to store objects? In array or a list? Also trying to figure about how to update a post content provided by an id in function. Thanks !