fn binary_fn_in_place_second_arg<U: FnOnce(&Self::Elem, &mut Self::Elem)>(
        &mut self,
        binary_fn: U,
    ) -> Result<(), crate::StackError> {
        binary_fn(&self.x, &mut self.y);
        self.x = std::mem::replace(&mut self.y, std::mem::replace(&mut self.z, self.t.clone()));
        Ok(())
    }
/// Appy a binary operation to the X and Y registers, consuming them.
/// Leave the result in X, shift other registers down, cloning the T register.
///
/// # Example
///
/// ```
/// use smsflib::prelude::*;
///
/// let mut stack = ClassicStack::<u32>::new(10, 100, 3, 4);
/// let res = stack.binary_fn_in_place_second_arg(|x: &u32, y: &mut u32| {*y -= x; } );
///
/// assert_eq!(res, Ok(()));
///
/// assert_eq!(*stack.x(), 90);
/// assert_eq!(*stack.y(), 3);
/// assert_eq!(*stack.z(), 4);
/// assert_eq!(*stack.t(), 4);
/// ```
Appy a binary operation to the X and Y registers, consuming them.
Leave the result in X, shift other registers down, cloning the T register.
Appy a binary operation to the X and Y registers consuming them . Leave the result in X shift other registers down cloning the T register .
fn binary_fn_in_place_second_arg<U: FnOnce(&Self::Elem, &mut Self::Elem)>(
        &mut self,
        binary_fn: U,
    ) -> Result<(), crate::StackError> {
        binary_fn(&self.x, &mut self.y);
        self.x = std::mem::replace(&mut self.y, std::mem::replace(&mut self.z, self.t.clone()));
        Ok(())
    }
fn binary_fn_in_place_second_arg < U : FnOnce ( & Self :: Elem , & mut Self :: Elem ) > ( & mut self , binary_fn : U , ) -> Result < ( ) , crate :: StackError > { binary_fn ( & self . x , & mut self . y ) ; self . x = std :: mem :: replace ( & mut self . y , std :: mem :: replace ( & mut self . z , self . t . clone ( ) ) ) ; Ok ( ( ) ) }
Appy a binary operation to the X and Y registers, consuming them.
Appy a binary operation to the X and Y registers consuming them .
&mut self
binary_fn
U
example
```
use smsflib::prelude::*.






` ` ` use smsflib :: prelude :: * .