MCPcopy Create free account
hub / github.com/Singular/Singular / fold

Method fold

ppcc/adlib/arr.h:342–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340template <typename T>
341template <typename A, typename F>
342A Arr<T>::fold(A init, F foldfunc) {
343 A result = init;
344 for (Int i = 0; i < _len; i++) {
345 result = foldfunc(result, _data[i]);
346 }
347 return result;
348}
349
350template <typename T>
351bool Arr<T>::eq(Arr<T> *that) {

Callers 1

MainFunction · 0.45

Calls

no outgoing calls

Tested by 1

MainFunction · 0.36