Okay, here is another freebie :) I will put in a real one before the end of the weekend.
Basically, you are given a list from which you need to create a new list where each element is the product of all the "OTHER" elements.
I found a few interesting corner cases.
I challenge you to give it a try!
Read the challenge here:
https://git.qoto.org/Absinthe/productnot/blob/master/README.md
My attempt is checked into that repo as well.
A Python solution
@zingbretsen now you are stretching me. I have never seen rotate() but I can intuit what it does. I also have not used lamda's. But what is happening in the reduce() call? I assume the lamda takes 2 values how is that acting on the list? Or is the lamda being passed into the reduce call ... time to read about reduce :)
@Absinthe The lambda is basically an anonymous function. It's passed in to the reduce call. Reduce calls that repeatedly until you're left with only one value.
@zingbretsen yeah, I looked it up. Works nice, perhaps I will try it with the list comprehension that I suggested.
@zingbretsen sounds like the big data functions. :)
@Absinthe Yeah, MapReduce is (well, was) pretty widely used for "big data" processing
@Absinthe https://book.pythontips.com/en/latest/map_filter.html
I think that gives a good breakdown of map, filter, and reduce, which are common in functional programming.