Advertisement
Guest User

Untitled

a guest
Nov 14th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.43 KB | None | 0 0
  1.     val allConsecutiveTraces:List[List[(TeraEvent,Boolean)]] = inMall.foldLeft(
  2.       List[List[(TeraEvent, Boolean)]]()){
  3.      (visits:List[List[(TeraEvent, Boolean)]], event_with_inmall:(TeraEvent,Boolean)) =>
  4.           if (visits.size == 0  || event_with_inmall._2 != visits.tail.tail._2) {
  5.           visits:+List[(TeraEvent,Boolean)](event_with_inmall)
  6.         } else {
  7.             visits.tail:+event_with_inmall
  8.         }
  9.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement