import { Disposable , disposeAll } from '@typed/disposable' ; import { Arity1 } from '@typed/lambda' ; import { Timer } from './types' ; param fn param interval param timer returns export function interval ( fn , interval , timer ) { return timer . delay ( onInterval , interval ) ; function onInterval ( time ) { return disposeAll ( [ fn ( time ) , timer . delay ( onInterval , interval ) ] ) ; } }