MCPcopy Create free account
hub / github.com/BowenFu/hspp / replicateM_Impl

Function replicateM_Impl

develop/include/typeclass.h:1772–1785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1770// for IO
1771template <typename MData>
1772constexpr inline auto replicateM_Impl (size_t times, MData const& mdata)
1773{
1774 static_assert(isMonadV<MData>);
1775 return data::io(
1776 [=]
1777 {
1778 for (size_t i = 0; i < times; ++i)
1779 {
1780 mdata.run();
1781 }
1782 return _o_;
1783 }
1784 );
1785}
1786
1787constexpr inline auto replicateM_ = toGFunc<2>([](size_t times, auto mdata)
1788{

Callers 1

typeclass.hFile · 0.70

Calls 2

ioFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected