feat: update structure

This commit is contained in:
2024-01-22 14:27:40 +08:00
parent 7836c9185c
commit 3544a28a2e
559 changed files with 120846 additions and 4102 deletions

View File

@@ -0,0 +1,25 @@
import cs2030s.fp.Constant;
import cs2030s.fp.Memo;
class Bool implements Cond {
private Memo<Boolean> val;
public Bool(Constant<Boolean> val) {
this.val = Memo.from(val);
}
@Override
public boolean eval() {
return this.val.get();
}
@Override
public String toString() {
return this.val.toString().substring(0, 1);
}
@Override
public Cond neg() {
return new Not(this);
}
}