(isListExp) predicate

This commit is contained in:
2021-11-30 12:44:27 -07:00
parent a12f0e1936
commit 4dc4794673
2 changed files with 12 additions and 2 deletions

View File

@@ -420,7 +420,16 @@ class Prelude {
case ListExp(exps):
exps;
default: throw 'expected $s to be a list expression';
}
};
}
public static function isListExp(s:ReaderExp):Bool {
return switch (s.def) {
case ListExp(exps):
true;
default:
false;
};
}
#if sys