pub fn reference_type(&self) -> ReferenceType {
        match self {
            SafasCell::Monad(_, _)                                  => ReferenceType::Monad,
            SafasCell::FrameReference(_, _, ref_type)               => *ref_type,
            SafasCell::FrameMonad(frame_monad)                      => if frame_monad.returns_monad() { ReferenceType::ReturnsMonad } else { ReferenceType::Value },
            SafasCell::BoundSyntax(syntax)                          => syntax.reference_type(),
            SafasCell::List(car, cdr)                               => {
                if let SafasCell::Syntax(syntax, _) = &**car {
                    syntax.reference_type(cdr.clone())
                } else {
                    match car.reference_type() {
                        ReferenceType::ReturnsMonad => ReferenceType::Monad,            // Calling something that returns a monad, so evaluates to a monad
                        ReferenceType::Monad        => ReferenceType::Monad,            // See compile_statement: 'calling' a monad returns a monad
                        _                           => ReferenceType::Value
                    }
                }
            },
            _                                                       => ReferenceType::Value
        }
    }
///
/// Returns the reference type for this cell
///
Returns the reference type for this cell
Returns the reference type for this cell
pub fn reference_type(&self) -> ReferenceType {
        match self {
            SafasCell::Monad(_, _)                                  => ReferenceType::Monad,
            SafasCell::FrameReference(_, _, ref_type)               => *ref_type,
            SafasCell::FrameMonad(frame_monad)                      => if frame_monad.returns_monad() { ReferenceType::ReturnsMonad } else { ReferenceType::Value },
            SafasCell::BoundSyntax(syntax)                          => syntax.reference_type(),
            SafasCell::List(car, cdr)                               => {
                if let SafasCell::Syntax(syntax, _) = &**car {
                    syntax.reference_type(cdr.clone())
                } else {
                    match car.reference_type() {
                        ReferenceType::ReturnsMonad => ReferenceType::Monad,            // Calling something that returns a monad, so evaluates to a monad
                        ReferenceType::Monad        => ReferenceType::Monad,            // See compile_statement: 'calling' a monad returns a monad
                        _                           => ReferenceType::Value
                    }
                }
            },
            _                                                       => ReferenceType::Value
        }
    }
pub fn reference_type ( & self ) -> ReferenceType { match self { SafasCell :: Monad ( _ , _ ) => ReferenceType :: Monad , SafasCell :: FrameReference ( _ , _ , ref_type ) => * ref_type , SafasCell :: FrameMonad ( frame_monad ) => if frame_monad . returns_monad ( ) { ReferenceType :: ReturnsMonad } else { ReferenceType :: Value } , SafasCell :: BoundSyntax ( syntax ) => syntax . reference_type ( ) , SafasCell :: List ( car , cdr ) => { if let SafasCell :: Syntax ( syntax , _ ) = & * * car { syntax . reference_type ( cdr . clone ( ) ) } else { match car . reference_type ( ) { ReferenceType :: ReturnsMonad => ReferenceType :: Monad , // Calling something that returns a monad, so evaluates to a monad ReferenceType :: Monad => ReferenceType :: Monad , // See compile_statement: 'calling' a monad returns a monad _ => ReferenceType :: Value } } } , _ => ReferenceType :: Value } }
Returns the reference type for this cell
Returns the reference type for this cell
&self
&self