daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val stream Stream[Record] = expression.stream().iterator().asScala.toStream
  2. stream.map(println(_))
  3.    
  4. expression.stream().forEach(println);
  5.    
  6. def allRecords():Stream[Record] = {
  7.   val cur = expression.fetchLazy()
  8.   def inner(): Stream[Record] = {
  9.     if(cur.hasNext) {
  10.       val next =  cur.fetchOne
  11.       next #:: inner()
  12.     }
  13.     else
  14.       Stream.empty
  15.     }
  16.   inner()
  17. }
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