Home

Random snippet for tag math - scala-kurz.org

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

factorial :)

Daniel Lorch (1) Visit homepage of Daniel Lorch Permalink

Tags: factorial (3) math (10)