WIP lambda

* typesystem extended
* docstrings and callback
* tests defined, not implemented
This commit is contained in:
Ava Apples Affine 2023-03-12 20:29:39 -07:00
parent 7befdc869b
commit b0bd369c1d
Signed by: affine
GPG key ID: 3A4645B8CF806069
4 changed files with 88 additions and 24 deletions

View file

@ -227,6 +227,18 @@ impl fmt::Display for Args {
}
}
impl fmt::Display for UserFn {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "(lambda: (");
for i in self.arg_syms {
write!(f, "{} ", i);
}
write!(f, ") {})", self.ast);
Ok(())
}
}
impl fmt::Display for ValueType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {