From 50fc58e8fc815053950b7b919a75cb363d83f114 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 3 Sep 2011 12:51:05 -0400 Subject: An abstract type of IDs --- lib/js/urweb.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/js/urweb.js') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 1277175d..7f636ef9 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -1374,5 +1374,14 @@ function bless(s) { return u; } + +// ID generation + +var nextId = 0; + +function fresh() { + return (--nextId).toString(); +} + // App-specific code -- cgit v1.2.3