Commit e48ae34e authored by Steffen Michels's avatar Steffen Michels

add documentation for qfoldl/r

parent 4067b0bc
Pipeline #8927 passed with stage
in 1 minute and 27 seconds
......@@ -169,6 +169,28 @@ strictTRZipWith3Rev :: !(a b c -> d) ![a] ![b] ![c] -> [d]
strictTRZipWith3Acc :: !(a b c -> d) ![a] ![b] ![c] ![d] -> [d]
// variants of the fold functions that use a queue instead of a fixed size list:
/**
* Left-associative fold of a list.
* Variant that use a queue instead of a fixed size list.
*
* @param Function that generates new elements, appended to the end of the list,
* for each list element and accumulator value
* @param Function that updates the accumulator value for each list element
* @param The initial accumulator value
* @param The initial list
* @result The final accumulator value
*/
qfoldl :: (a -> b -> [b]) (a -> b -> a) a ![b] -> a
/**
* Right-associative fold of a list.
* Variant that use a queue instead of a fixed size list.
*
* @param Function that generates new elements, appended to the end of the list,
* for each list element and accumulator value
* @param Function that updates the accumulator value for each list element
* @param The initial accumulator value
* @param The initial list
* @result The final accumulator value
*/
qfoldr :: (a -> b -> [b]) (b -> a -> a) a ![b] -> a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment