progs/app1.scala
changeset 428 a47c4227a0c6
parent 254 dcd4688690ce
child 559 db5cb071644d
equal deleted inserted replaced
427:546f2090ce12 428:a47c4227a0c6
     1 def get_page(url: String) : String = {
     1 def get_page(url: String) : String = {
     2   Try(Source.fromURL(url).take(10000).mkString) getOrElse 
     2   Try(Source.fromURL(url).take(10000).mkString).
     3     { println(s"  Problem with: $url"); ""}
     3      getOrElse { println(s"  Problem with: $url"); ""}
     4 }
     4 }