Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 51 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. fn invoke<F, R>(f: F) -> R
  2. where
  3.     F: Fn(i32) -> R,
  4. {
  5.     f(1)
  6. }
  7.  
  8. fn main() {
  9.     let inc: i32 = invoke(|v| v + 1);
  10.     let toa: String = invoke(|v| format!("{}", v));
  11. }
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