Suppress display of a result in scala worksheet -
i suppress output of helper variables in scala worksheet:
val sqs = scen.rssis.toseq.filter { case (ap,s) => s.exists(e => e.epoch > 1) }.sortby { -_._2.length }.take(10) //> sqs : // *snip* lot of stuff i'd rather not have //| output exceeds cutoff limit. sqs foreach { case (api,s) => println(f"${scen.aps(api).ssid}%-10s ${s.length}% 5d") } //> 2wire230 74 //| 2wire736 74 //| jamie56 73 //| vvhoa 69 //| 2wire059 68 //| rainsnet 68 //| 2wire519 67 //| 2wire604 65 //| neo_vex_24 63 //| alemania7 63
is there way suppress output of assignment in scala worksheet?
there no explicit way suppress output. however, can achieve moving helper declarations in outer (or nested) object.
for instance, following it:
object worksheet { object helper { val sqs = scen.rssis.toseq.filter { case (ap,s) => s.exists(e => e.epoch > 1) }.sortby { -_._2.length }.take(10) } helper.sqs foreach { case (api,s) => println(f"${scen.aps(api).ssid}%-10s ${s.length}% 5d") } }
Comments
Post a Comment