Pascal's triangle: Difference between revisions

Line 783:
end</lang>
=={{header|Scala}}==
Simple recursive implementationrow definition:
<lang scala>
def tri(rows:Int):List[Int] = { rows match {
Line 791:
}
</lang>
Funtion to pretty print itr rows:
<lang scala>
def prettytri(r:Int) = (1 to r) foreach {n=>print(" "*(r-n)); tri(n) map (c=>print(c+" ")); println}