Skip to content

Instantly share code, notes, and snippets.

@wolfflow
Created February 7, 2014 11:39
Show Gist options
  • Save wolfflow/8861214 to your computer and use it in GitHub Desktop.
Save wolfflow/8861214 to your computer and use it in GitHub Desktop.
tasks = [
{done:false, results:[]}
{done:true, results:[]}
]
isDone = ->
tasks.filter((x)->x.done).length is tasks.length
Bacon.later(20000).assign(-> tasks[0].done = true)
allDone = Bacon.interval(250).toProperty(isDone!).map(isDone).skipDuplicates!.filter((x)->x)
allDone.log!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment