Sha256: 27b179eacbba368022a640e789706ab9e5c2dcb078d4ca216ee09b5f9aa82fad

Contents?: true

Size: 402 Bytes

Versions: 6

Compression:

Stored size: 402 Bytes

Contents

# Sum

Arithmetic sum

## Signature

sum(expr: AttrName|(Tuple->Numeric)) -> Aggregator

## Examples
sum(:qty)
sum{|t| t.qty * t.price }
sum(->(t){ t.qty * t.price })

## Description

Computes `v1 + v2 + ... + vn`.

## Implementation notes

This aggregate function should only be used with numeric types. As of
current Alf version, it does not aggregate empty sets correctly on
non-numeric data types.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
alf-shell-0.16.4 doc/txt/sum.txt
alf-shell-0.16.3 doc/txt/sum.txt
alf-shell-0.16.2 doc/txt/sum.txt
alf-shell-0.16.1 doc/txt/sum.txt
alf-shell-0.16.0 doc/txt/sum.txt
alf-shell-0.15.0 doc/txt/sum.txt