Just spent a few moments reading through your code. Here is some feedback I have, but I'm also kinda new so don't take it too seriously.
You should consider converting the first input array to a 2-tuple. You use it as a tuple in equalizer so having the type be a tuple will make the code clearer. It also forces you to do a little bit of input validation, which is always nice :D
Some functions don't have a great name. Specifically, equalizer and combinationPairs. Personally, they should probably be verbs. combinations = combinePairs weights sounds a bit nicer, in my opinion.
Also, I like the use of applicative functors for the combinePairs function :)
Just spent a few moments reading through your code. Here is some feedback I have, but I'm also kinda new so don't take it too seriously.
You should consider converting the first input array to a 2-tuple. You use it as a tuple in
equalizer
so having the type be a tuple will make the code clearer. It also forces you to do a little bit of input validation, which is always nice :DSome functions don't have a great name. Specifically,
equalizer
andcombinationPairs
. Personally, they should probably be verbs.combinations = combinePairs weights
sounds a bit nicer, in my opinion.Also, I like the use of applicative functors for the
combinePairs
function :)Thanks for taking some time to help me on my journey.