I apologize for how basic this question is, however in any case this is my first scala project all i am attempting to do is pass an array into a function and return the function. here's what i have:
def main(args: Array[String]): Unit = {
// 9999 == infinite there should be no reason
// that for the scope of this assignment there
// there should be a value any bigger than this.
var Nodes = 4;
var infi = 9999;
var pathTaken = Array(Nodes);
var pathLens = Array(Nodes);
var paths = Array(Nodes, Nodes);
pathLens = lenInit(pathLens);
}
def pathLens(x : Array[4]): Unit = {
x = (0, 0, 0, 0);
return x;
}
I get that this is super basic and simple but i have been a C/python guy all my life and I have been scavenging the internet up to this point fruitlessly. please help/point me in the right direction many thanks!