daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. interface val Bound[T: Any val]
  2.  
  3. class val Inclusive[T: Any val] is Bound[T]
  4.   let v: T
  5.   new val create(value: T) =>
  6.     v = consume value
  7.  
  8. class val Exclusive[T: Any val] is Bound[T]
  9.   let v: T
  10.   new val create(value: T) =>
  11.     v = consume value
  12.  
  13. class Range[T: Any val, S: Any val]
  14.   let _lower_bound: Bound[T]
  15.   let _upper_bound: Bound[T]
  16.   let _step: S
  17.  
  18.   new create(lower: Bound[T], upper: Bound[T], step: S) =>
  19.     _lower_bound = lower
  20.     _upper_bound = upper
  21.     _step = consume step
  22.    
  23.   new inclusive(lower: T, upper: T, step: S) =>
  24.     _lower_bound = Inclusive[T](consume lower)
  25.     _upper_bound = Inclusive[T](consume upper)
  26.     _step = consume step
  27.  
  28. actor Main
  29.   new create(env: Env) =>
  30.     None
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