progs/fact.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 25 Dec 2023 01:10:55 +0100
changeset 482 769bda18a43d
parent 449 d67c5f7177a6
permissions -rw-r--r--
updated jars

object Fact {

def fact(n: Int): Int = 
  if (n == 0) 1 else n * fact(n - 1)

}