feat: move everything to single folder

This commit is contained in:
Yadunand Prem
2022-11-05 10:28:46 +08:00
parent 0eb6cd0b30
commit 44c87f3500
315 changed files with 48612 additions and 0 deletions

25
cs2030s/Lab6/Bool.java Normal file
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);
}
}