fn assemble_fn() -> impl FrameMonad<Binding=RuntimeResult> {
    FnMonad::from(|(monad, ): (CellRef, )| {

        if let Some(monad) = BitCodeMonad::from_cell(&monad) {
            let (result, bitcode)   = assemble(&monad)?;
            let bitcode             = CellRef::new(SafasCell::BitCode(bitcode));

            Ok(SafasCell::list_with_cells(vec![bitcode, result]))
        } else {
            // Only works on bitcode monads
            Err(RuntimeError::NotBitCode(monad))
        }

    })
}
///
/// Function that takes a monad parameter and returns the assembled bitcode
/// 
/// Normally monad parameters to functions are remapped so that the monad's content is used instead of the
/// monad itself, so this requres assistance from syntax (the assemble keyword in this case) to work.
///
Function that takes a monad parameter and returns the assembled bitcode
Normally monad parameters to functions are remapped so that the monad's content is used instead of the
monad itself, so this requres assistance from syntax (the assemble keyword in this case) to work.
Function that takes a monad parameter and returns the assembled bitcode Normally monad parameters to functions are remapped so that the monad ' s content is used instead of the monad itself so this requres assistance from syntax ( the assemble keyword in this case ) to work .
fn assemble_fn() -> impl FrameMonad<Binding=RuntimeResult> {
    FnMonad::from(|(monad, ): (CellRef, )| {
        if let Some(monad) = BitCodeMonad::from_cell(&monad) {
            let (result, bitcode)   = assemble(&monad)?;
            let bitcode             = CellRef::new(SafasCell::BitCode(bitcode));
            Ok(SafasCell::list_with_cells(vec![bitcode, result]))
        } else {
            // Only works on bitcode monads
            Err(RuntimeError::NotBitCode(monad))
        }
    })
}
fn assemble_fn ( ) -> impl FrameMonad < Binding = RuntimeResult > { FnMonad :: from ( | ( monad , ) : ( CellRef , ) | { if let Some ( monad ) = BitCodeMonad :: from_cell ( & monad ) { let ( result , bitcode ) = assemble ( & monad ) ? ; let bitcode = CellRef :: new ( SafasCell :: BitCode ( bitcode ) ) ; Ok ( SafasCell :: list_with_cells ( vec ! [ bitcode result ] ) ) } else { // Only works on bitcode monads Err ( RuntimeError :: NotBitCode ( monad ) ) } } ) }
Function that takes a monad parameter and returns the assembled bitcode
Normally monad parameters to functions are remapped so that the monad's content is used instead of the
monad itself, so this requres assistance from syntax (the assemble keyword in this case) to work.
Function that takes a monad parameter and returns the assembled bitcode Normally monad parameters to functions are remapped so that the monad ' s content is used instead of the monad itself so this requres assistance from syntax ( the assemble keyword in this case ) to work .