Merge pull request #2372 from rtfeldman/effect-forever

Add `Effect.forever`
This commit is contained in:
Folkert de Vries 2022-01-20 09:16:32 +01:00 committed by GitHub
commit 82c7e8c37e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 864 additions and 8 deletions

View file

@ -569,6 +569,11 @@ impl<'a> LambdaSet<'a> {
*self.representation
}
/// Does the lambda set contain the given symbol?
pub fn contains(&self, symbol: Symbol) -> bool {
self.set.iter().any(|(s, _)| *s == symbol)
}
pub fn is_represented(&self) -> Option<Layout<'a>> {
if let Layout::Struct(&[]) = self.representation {
None