From cd28ea2ee01ac023b7b1dfac39ae5ddf4ded5c4e 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') 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