Skip to content

Commit

Permalink
Fix bug in ref
Browse files Browse the repository at this point in the history
  • Loading branch information
kayceesrk committed Dec 8, 2016
1 parent ca9a2e8 commit 26ec6fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/ref.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ module Make(Sched: Scheduler.S)

let upd r f = upd r f Reagent.commit

let cas r expect update = upd r (fun current ->
if current = expect then Some update else None)
let cas r expect update = upd r (fun current () ->
if current = expect then Some (update, ()) else None)
end

0 comments on commit 26ec6fd

Please sign in to comment.