Talk:cpp/algorithm/inner product

Example
I am a big fan of because of my prior exposure to APL (thank you, C++ Committee, for mentioning APL in the footnote for !). In that language, generalized inner product is a language primitive and has a million clever uses (see chapters 18 through 21 of APL Idiom library for example). Could we incorporate one of those, say idiom #328 "count pairwise matches",, to show that it's not just for linear algebra? Or would it be too much for a C++ reference? In my opinion, examples that simply repeat in code what the page just said in English feel almost redundant. --Cubbi 13:17, 18 August 2011 (PDT)
 * Of course. It would be great since that is what the examples are for - to show the non-obvious things that can be done with the API. The size of the whole example code doesn't matter as it is placed at the end of the page. So you can add as much interesting cases as you feel is needed. Speaking about 'too much for a C++ reference', all those restrictions are here just to prevent the mess that takes place once everyone starts explaining obvious things and, what is even worse, does that in detail. So if you think something is sufficiently complex or interesting, feel free to add to the article. E.g. see notes at P12 13:43, 18 August 2011 (PDT)
 * Actually, I can probably mod the existing example since it already calls inner_product twice. --Cubbi 13:31, 18 August 2011 (PDT)