<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>scala on Shan Islam</title><link>/tags/scala/</link><description>Recent content in scala on Shan Islam</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Tue, 21 Apr 2020 22:24:05 +0100</lastBuildDate><atom:link href="/tags/scala/index.xml" rel="self" type="application/rss+xml"/><item><title>Scala</title><link>/scala/</link><pubDate>Tue, 21 Apr 2020 22:24:05 +0100</pubDate><guid>/scala/</guid><description>Table of Contents Useful File exists 1 new java.io.File(file_path).isFile Split List given seperator 1 2 3 4 5 6 7 8 9 10 11 12 import scala.collection.mutable.ListBuffer def listSplit[T](collection:Seq[T],seperator:T):Seq[Seq[T]]= { val name = ListBuffer(ListBuffer[T]()) collection foreach {e =&amp;gt; if(e == seperator){ name += ListBuffer[T]() } else { name.last += e } } name.map(_.toSeq).toSeq }</description></item></channel></rss>