fixing map and zkcons syntax

This commit is contained in:
ada
2020-11-04 19:38:07 +01:00
parent 82321d3645
commit f7877f0ea3
2 changed files with 12 additions and 4 deletions

View File

@@ -277,7 +277,8 @@ fn eval(mut ast: MalVal, mut env: Env) -> MalRet {
let value = eval_ast(&a2, &env)?;
match value {
List(ref el, _) => {
zkcons_eval(el.to_vec(), &a1, &env);
println!("{:?}", el);
//zkcons_eval(el.to_vec(), &a1, &env);
}
_ => println!("invalid format"),
}

View File

@@ -9,12 +9,19 @@
;; (sub lc0 x)
;; )
;; )
(zkcons! circuit (map (fn* [b] (
(map (fn* [b] (
(zkcons! circuit (
(add lc0 one)
(sub lc0 b)
(add lc1 x)
(add lc1 x))
;; 'enforce)
)) bits))
))) bits)
;; (zkcons! circuit (map (fn* [b] (
;; (add lc0 one)
;; (sub lc0 b)
;; (add lc1 x)
;; 'enforce)
;; )) bits))
;; (def! enforce-loop-const (map (fn* [b] (
;; (add lc0 one)
;; (sub lc0 b)