aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-13 15:47:54 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-13 15:47:54 +0200
commit294370d0663d576a6d37a80bc8fe5cf9f9ebf7b1 (patch)
tree3d116f018f35995b351a22061f077cfae19785e8
parentMerge long event creation as comments. (diff)
downloadcalp-294370d0663d576a6d37a80bc8fe5cf9f9ebf7b1.tar.gz
calp-294370d0663d576a6d37a80bc8fe5cf9f9ebf7b1.tar.xz
"Improve" gensym.
-rw-r--r--static/script.js6
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();