daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::ops::{Mul, Add};
  2. use std::iter::Product;
  3. use std::ops::RangeInclusive;
  4.  
  5.  
  6. fn factorial_iterative<T, Out>(m: T, n: T) -> Out
  7. where
  8.     T: Product, RangeInclusive<T>: Iterator<Item = T>,
  9.     Out: Product, Mul<T, Output=Out> + Add<T, Output=Out>
  10. {
  11.     let ret = (m..=n).product();
  12.     return ret;
  13. }
  14.  
  15. fn main()
  16. {
  17.    
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top