diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-13 15:47:54 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-13 15:47:54 +0200 |
commit | 294370d0663d576a6d37a80bc8fe5cf9f9ebf7b1 (patch) | |
tree | 3d116f018f35995b351a22061f077cfae19785e8 /static/script.js | |
parent | Merge long event creation as comments. (diff) | |
download | calp-294370d0663d576a6d37a80bc8fe5cf9f9ebf7b1.tar.gz calp-294370d0663d576a6d37a80bc8fe5cf9f9ebf7b1.tar.xz |
"Improve" gensym.
Diffstat (limited to '')
-rw-r--r-- | static/script.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/static/script.js b/static/script.js index d9f85aa6..e9826277 100644 --- a/static/script.js +++ b/static/script.js @@ -34,11 +34,7 @@ function decimal_time_to_date (time, date) { } /* if only there was such a thing as a let to wrap around my lambda... */ -let gensym = (function(counter) { - return function gensym (prefix="gensym") { - return prefix + ++counter; - } -})(0); +const gensym = (counter => (prefix="gensym") => prefix + ++counter)(0) /* start and end time for calendar page */ let start_time = new Date(); |