MVFM

redis/incr

Atomically increment a numeric string by one

const app = mvfm(prelude, redis);
const prog = app({}, ($) => {
  return $.begin(
    $.redis.set("counter", "10"),
    $.redis.incr("counter")
  );
});
await fold(
  defaults(app, { redis: memoryRedisInterpreter }),
  prog
);
Ctrl+Enter