Skip to content

Commit

Permalink
Added condo2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Lozov authored and Kakadu committed May 11, 2024
1 parent 4215a06 commit 2026663
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/Core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,12 @@ let (?|) gs st =

let conde = (?|)

let condo2 a b st =
let st = State.new_scope st in
match Stream.msplit @@ a st with
| Some (a, b) -> Stream.cons a b
| None -> b st

let call_fresh f st =
let x = State.fresh st in
f x st
Expand Down
2 changes: 2 additions & 0 deletions src/core/Core.mli
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ val (|||) : goal -> goal -> goal
*)
val (?|) : goal list -> goal

val condo2 : goal -> goal -> goal

(** [conde] is a synonym for [?|] *)
val conde : goal list -> goal

Expand Down

0 comments on commit 2026663

Please sign in to comment.