Lets say that I have a function definition:
let sum (numbers: int list) =
What are the possible ways to calculate the sum of all the other elements in the list of numbers? Therefore, if the result of [3;5;3;7] is [(3, 15); (5, 13); (3, 15); (7, 11)] [(3, 15); (5, 13); (3, 15); (7, 11)] [(3, 15); (5, 13); (3, 15); (7, 11)] .
Im really interested in any solutions, especially those that use a functional approach.
thanks
functional-programming f #
Diverclaim
source share