Skip to content

Commit 2fdb5a7

Browse files
committed
Add PointEvaluations::{fst,snd} helper methods
1 parent b6ad2d0 commit 2fdb5a7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

kimchi/src/proof.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,22 @@ impl<Evals> PointEvaluations<Evals> {
193193
}
194194
}
195195

196+
impl<Evals: Copy> PointEvaluations<Evals> {
197+
/// Mimic OCaml `point[0]`
198+
///
199+
/// Short for `first`
200+
pub fn fst(&self) -> Evals {
201+
self.zeta
202+
}
203+
204+
/// Mimic OCaml `point[1]`
205+
///
206+
/// Shoft for `second`
207+
pub fn snd(&self) -> Evals {
208+
self.zeta_omega
209+
}
210+
}
211+
196212
impl<Eval> ProofEvaluations<Eval> {
197213
pub fn map<Eval2, FN: Fn(Eval) -> Eval2>(self, f: &FN) -> ProofEvaluations<Eval2> {
198214
let ProofEvaluations {

0 commit comments

Comments
 (0)