Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Map-like structure but using enum variants

$
0
0

If it’s just about mapping status → count, you could use a regular JS map:

type status = Tracking | Watching | Completed

let m = Map.make()

m->Map.set(Watching, 1)

Viewing all articles
Browse latest Browse all 2592

Trending Articles