Snippets tagged extension

  • Extensions to the Fold function

    This snippet is helpfull in the following cases: 1) After a consolidation operation using the fold function we need to know how many elements have been processed. 2) A consolidation operation needs to use the index of each of the elements processed and we don't want to use the mapi function first. 3) A combination of the above. Since the following snippet just adds a wrapper to the existing Fold function we can repeat the approach for arrays and sequences (including the plinq ones)

    29 people like this

    Posted: 7 years ago by Horacio Nuñez

  • Adding two numbers has never been this awful

    Normally, you'd add two numbers with the '+' operator. But why do that when you can use Type Extensions, custom operations on Computation Expressions, customer operators, and more?

    6 people like this

    Posted: 2 months ago by Phillip Carter