Browse files

renamed switch_ee/switch_bb to join_e/join_b

  • Loading branch information...
1 parent d04af70 commit 6bac3c7055bd20f7e499ae03651c6068e3d92070 Jake Donham committed Apr 22, 2010
Showing with 10 additions and 10 deletions.
  1. +4 −4 src/froc/froc.ml
  2. +6 −6 src/froc/froc.mli
View
8 src/froc/froc.ml
@@ -152,7 +152,7 @@ let collect f init t =
match r with Some r -> st := r; send_result s' r | _ -> ());
t'
-let switch_ee ee =
+let join_e ee =
let t, s = make_event () in
let c = ref no_cancel in
notify_result_e ee
@@ -196,9 +196,9 @@ let notify_result_b_cancel = notify_result_cancel
let hash_behavior = hash
-let switch_bb ?eq bb = bind ?eq bb (fun b -> b)
+let join_b ?eq bb = bind ?eq bb (fun b -> b)
-let switch_be ?eq b e =
+let switch ?eq b e =
let bt, bu = make_changeable ?eq () in
let c = ref (connect_cancel bu b) in
notify_result_e e
@@ -207,7 +207,7 @@ let switch_be ?eq b e =
| Fail e -> cancel !c; c := no_cancel; write_exn bu e);
bt
-let until ?eq b e = switch_be ?eq b (next e)
+let until ?eq b e = switch ?eq b (next e)
let hold_result ?eq init t =
let bt, bu = make_changeable ?eq ~result:init () in
View
12 src/froc/froc.mli
@@ -278,19 +278,19 @@ val collect : ('b -> 'a -> 'b) -> 'b -> 'a event -> 'b event
state.
*)
-val switch_ee : 'a event event -> 'a event
- (** [switch_ee ee] fires whenever the event last fired from [ee] fires *)
+val join_e : 'a event event -> 'a event
+ (** [join_e ee] fires whenever the event last fired from [ee] fires *)
val hash_event : 'a event -> int
(** A hash function for events. *)
(** {2 Derived operations} *)
-val switch_bb : ?eq:('a -> 'a -> bool) -> 'a behavior behavior -> 'a behavior
- (** [switch_bb b] behaves as whichever behavior is currently the value of [b]. *)
+val join_b : ?eq:('a -> 'a -> bool) -> 'a behavior behavior -> 'a behavior
+ (** [join_b b] behaves as whichever behavior is currently the value of [b]. *)
-val switch_be : ?eq:('a -> 'a -> bool) -> 'a behavior -> 'a behavior event -> 'a behavior
- (** [switch_be b e] behaves as [b] until [e] fires, then behaves as the last value of [e]. *)
+val switch : ?eq:('a -> 'a -> bool) -> 'a behavior -> 'a behavior event -> 'a behavior
+ (** [switch b e] behaves as [b] until [e] fires, then behaves as the last value of [e]. *)
val until : ?eq:('a -> 'a -> bool) -> 'a behavior -> 'a behavior event -> 'a behavior
(** [until b e] behaves as [b] until [e] fires [b'], then behaves as [b'] *)

0 comments on commit 6bac3c7

Please sign in to comment.