Need help in Advanced Scala concepts

#1

Declare an implicit integer variable 5. Generate a List with input1 such that the no. of elements is equal to input1 and the numbers are from 1 to input1. (when input is 3 -> List(1,2,3)). Write a curried function add which takes two integer variables in which one variable is an implicit variable. Using a for comprehension apply the add function on generated list and print the result.

I am trying to code the above condition but the system doesnt seem to accept the output. Can someone please help in coding this

#2

Can you share what you tried so far and what result you got and what the issue is with the result?

1 Like