Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

oops collect -> collect_{e,b}

  • Loading branch information...
commit 6068a1fab883ed9254bfeb53a1f9c15e8af0bb20 1 parent 6c60f28
Jake Donham authored
View
9 examples/froc-dom/bounce/bounce.ml
@@ -93,11 +93,10 @@ let onload () =
(F.merge [ xy_out_of_bounds; x_out_of_bounds; y_out_of_bounds; hit_paddle ]))
end in
- F.hold init_p
- (F.collect
- (fun (x, y) () -> let vx, vy = F.sample v in (x +. vx, y +. vy))
- init_p
- (Fd.ticks 20.))
+ F.collect_b
+ (fun (x, y) () -> let vx, vy = F.sample v in (x +. vx, y +. vy))
+ init_p
+ (Fd.ticks 20.)
end in
let ball =
View
4 examples/froc-dom/quickhull/quickhull.ml
@@ -193,7 +193,7 @@ let onload () =
let p = p +. v in
let v = if p <= min || p >= max then -.v else v in
p, v in
- F.collect collect (init, v) ticks |>
+ F.collect_e collect (init, v) ticks |>
F.map fst |>
F.hold init in
let x = coord () and y = coord () in
@@ -219,7 +219,7 @@ let onload () =
| `Stationary -> let v = v + 1 in (v, stationary v)
| `Bouncing -> let v = v + 1 in (v, bouncing v)
| `Remove -> match v with 0 -> (0, lookup 0) | v -> let v = v - 1 in (v, lookup v) in
- F.collect collect (0, L.nil ()) clicks |>
+ F.collect_e collect (0, L.nil ()) clicks |>
F.map snd |>
F.hold (L.nil ()) |>
F.join_b in
Please sign in to comment.
Something went wrong with that request. Please try again.