Adding Scala examples for Chapter 3 (#28)

* Add files via upload

* Update 01_countdown.scala

* Update 02_greet.scala

* Update 02_greet.scala
This commit is contained in:
chase-g
2017-09-25 20:29:03 -04:00
committed by Aditya Bhargava
parent 495a648a6a
commit 44f8151e11
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
def fact(x: Int): Int = {
if(x == 1) 1
else x * fact(x-1)
}
println(fact(5))