Snippets tagged aggregate

  • Seq.reduceBallanced function

    The function has the same type as Seq.reduce. Instead of reducing elements from the left to the right, it splits the input into two halves, reduces each half separately and then aggregates the results using the given function. This means that the values are aggregated into a ballanced tree, which can save stack space.

    2 people like this

    Posted: 13 years ago by Tomas Petricek

  • Basic F# LINQ GroupBy example and multiple aggregates

    Converting F# LINQ queries to SQL: - Basic example of simple group-by - Also if you want to have multiple aggregates (SUM, COUNT, MAX, MIN, AVG, ...) in the same SQL-clause, that is done with groupBy over a constant value.

    2 people like this

    Posted: 5 years ago by Tuomas Hietanen

  • Parallel fold

    Idea from Guy L. Steele - Organizing Functional Code for Parallel Execution; or, foldl and foldr Considered Slightly Harmful - https://vimeo.com/6624203

    9 people like this

    Posted: 9 years ago by Tuomas Hietanen