The 
Fibonacci sequence appears in Indian mathematics,
in 
connection with Sanskrit prosody.
Susantha writes that the development of the
Fibonacci sequence "is attributed in part
to Pingala (two hundred years Before Christ),
later being associated with Virahanka at year
seven hundred).
In the West, the Fibonacci sequence first
appears in the book Liber Abaci (1202) by
Leonardo of Pisa, known as Fibonacci.
Fibonacci considers the growth of an idealized
rabbit population.
The name "Fibonacci sequence" was first used
by the 19th-century number theorist Édouard
Lucas.
In mathematics, the 
Fibonacci numbers or Fibonacci sequence are
the numbers in the following integer sequence:1,1,2,3,5,8,13
By definition, the first two numbers in the
Fibonacci sequence are 1 and 1, or 0 and 1,
depending on the chosen starting point of
the sequence, and each subsequent number is
the sum of the previous two.
In mathematical terms, the sequence Fn of
Fibonacci numbers is defined by the recurrence
relation
Fn = Fn-1 + Fn-2
1.
Let’s define a function and name it Fibonacci
and forget that was the Indians the first
ones on discover it…
2.
It receives as parameter a Int parameter and
return a list of ints.
The first parameter will be the counter, it
has the purpose of acting as the final index
to be calculated.
For example, if we pass 10 the function must
calculate the sequence until the tenth position
and will return a list of 10 numbers in Fibonacci
sequence.
3.
We’ll declare a listbuffer, the ListBuffer
allow us insert more positions and its not
fixed range as a simple List or an Array because
those aren’t mutable, in Scala List and
Array are considered immutable.
For using the listBuffer 
we add the import at top of function or class
of type scala.collection.mutable.ListBuffer.
4.
Next we define a for, in Scala the for can
have many forms but the most common is using
an index Int starting with a fixed value until
a final value, so it will start in 0 and repeat
util equals than l parameter.
5.
Inside for we test if index in for is greater
than 1, because in Fibonacci classic sequence,
we maintain 1 until the third position, if
we don’t test if 
it is we have a different result than original
sequence of 1,1,2, it 
would lead to an invalid result because I
would be increment itself too early.
6.
If index is greater than 1 we add to listBuffer
sum of list i minus 1 plus list i minus 2,
its based on the mathematic definition we’ve
seen before in the form of Fn = Fn – 1 +
Fn – 2.
It will get the previous values already calculated
inside the list, passing the 
index first minus 1 and after minus 2, sum
both and add to listBuffer as a new value.
We can use the sum += signal for adding values
in a ListBuffer.
7.
If Index of for is equals than 1 it’ll just
add to listBuffer the number one, it 
will guarantee for us the first ones of the
sequence, the index will increment itself
until its 2 and reach the recursive branch.
8.
The for instruction will repeat until equals
than L so 
it will return 
a 
list with L positions passed.
9.
The final line converts the listBuffer using
util function toList and give us 
a List with ints in Fibonacci sequenced values.
10.
Finally we can print the sequence using a
lambda expression of forEach receiving as
parameter the println function, its equivalent
of doing forEach(x => println(x))
