fn add_two_small(cur_proc: &mut Process, a: LTerm, b: LTerm) -> BifResult
{
  // Both a and b are small, we've got an easy time
  let iresult = a.small_get_s() + b.small_get_s();
  // Even better: the result is also a small
  if fits_small(iresult) {
    return BifResult::Value(make_small_s(iresult))
  }
  create_bigint(cur_proc, iresult)
}
/// So the check above has concluded that `a` and `b` are both small integers.
/// Implement addition, possibly creating a big integer.
So the check above has concluded that `a` and `b` are both small integers.
Implement addition, possibly creating a big integer.
So the check above has concluded that ` a ` and ` b ` are both small integers . Implement addition possibly creating a big integer .
fn add_two_small(cur_proc: &mut Process, a: LTerm, b: LTerm) -> BifResult
{
  // Both a and b are small, we've got an easy time
  let iresult = a.small_get_s() + b.small_get_s();
  // Even better: the result is also a small
  if fits_small(iresult) {
    return BifResult::Value(make_small_s(iresult))
  }
  create_bigint(cur_proc, iresult)
}
fn add_two_small ( cur_proc : & mut Process , a : LTerm , b : LTerm ) -> BifResult { // Both a and b are small, we've got an easy time let iresult = a . small_get_s ( ) + b . small_get_s ( ) ; // Even better: the result is also a small if fits_small ( iresult ) { return BifResult :: Value ( make_small_s ( iresult ) ) } create_bigint ( cur_proc , iresult ) }
So the check above has concluded that `a` and `b` are both small integers.
So the check above has concluded that ` a ` and ` b ` are both small integers .
cur_proc
&mut Process
a
LTerm
b
LTerm