I do like the It templates, they make the code shorter.

Although I also found that nesting them was awkward when trying to multiply two 
sequences, it made me think of different ways to achieve the same thing, and 
make it look even better than the initial implementation, it ended looking like 
this:
    
    
    let acc = neuron.weights.zip(input).mapIt(it.a * it.b).foldr(a + b)
    

What's not to like about the above code; without the It template, the map would 
end up being more verbose, or worse, using for loops.

Reply via email to