Advertisement
Guest User

Untitled

a guest
Nov 18th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.40 KB | None | 0 0
  1. object Main extends App {
  2.   //  import java.io.File
  3.   def getPath(s: String): String = "home/ramadokayano/Development/Scala/FhabV2/img/in/train"
  4.  
  5.   def xrange(lo: Int, hi: Int): Stream[Int] = {
  6.     println(lo)
  7.     if(lo >= hi) Stream.empty
  8.     else Stream.cons(lo, xrange(lo + 1, hi))
  9.   }
  10.  
  11.   lazy val test = xrange(0, 999999)
  12.  
  13.   test(7)
  14.   println(" ")
  15.   (test.slice(0, 14).count(_ < 5)) >= 3
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement