const timeout = (dispatch, props) =>
  setTimeout(() => dispatch(props.action), props.delay)

const interval = (dispatch, props) => {
  const id = setInterval(() => {
    dispatch(props.action, Date.now())
  }, props.delay)
  return () => clearInterval(id)
}

const getTime = (dispatch, props) => dispatch(props.action, Date.now())

/** 
 * @example
 * 
  app({
    subscriptions: (state) => [
      // Dispatch RequestResource every delayInMilliseconds 
      every(state.delayInMilliseconds, RequestResource),
    ],
  })
 */
export const every = (delay, action) => [interval, { delay, action }]

/** 
 * @example
  const SlowClap = (state, ms = 1200) => [state, delay(ms, Clap)]
 */
export const delay = (delay, action) => [timeout, { delay, action }]

/** 
 * @example
  now(NewTime)
 */
export const now = (action) => [getTime, { action }]

@@ -325,26 +325,25 @@
 .now())%0A%0A/**
- 
 %0A
+
  * @example%0A
@@ -349,18 +349,16 @@
 %0A * 
-%0A  
 app(%7B%0A 
+*
    s
@@ -385,18 +385,17 @@
 ) =%3E %5B%0A 
-  
+*
    // Di
@@ -446,13 +446,11 @@
 onds
- 
 %0A 
-  
+*
    e
@@ -504,15 +504,17 @@
 ),%0A 
+*
    %5D,%0A 
+*
  %7D)%0A
@@ -583,33 +583,32 @@
 , action %7D%5D%0A%0A/**
- 
 %0A * @example%0A  c
@@ -605,16 +605,17 @@
 xample%0A 
+*
  const S
@@ -748,17 +748,16 @@
  %7D%5D%0A%0A/**
- 
 %0A * @exa
@@ -761,17 +761,18 @@
 example%0A
-
  
+*
  now(New

Use valid jsdoc comment syntax