MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / problem_10

Function problem_10

examples/99_problems.cpp:80–86  ·  view source on GitHub ↗

P10 (*) Run-length encoding of a list.

Source from the content-addressed store, hash-verified

78
79// P10 (*) Run-length encoding of a list.
80void problem_10()
81{
82 auto group_to_pair = [](const Ints& group) -> size_t_int_pair {
83 return std::make_pair(size_of_cont(group), group.front());
84 };
85 print_result(transform(group_to_pair, group(xs)));
86}
87
88// P11 (*) Modified run-length encoding.
89void problem_11()

Callers 1

mainFunction · 0.85

Calls 4

print_resultFunction · 0.85
size_of_contFunction · 0.50
transformFunction · 0.50
groupFunction · 0.50

Tested by

no test coverage detected