<div dir="ltr">Indeed it is cycle1, sorry to have missed it. It will be easier to spot it if it close to the stimes* functions in the beginning of the docs. It is placed too far down below even after Monoid re-exports.<div><br></div><div>-harendra</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 September 2017 at 14:09, Herbert Valerio Riedel <span dir="ltr"><<a href="mailto:hvriedel@gmail.com" target="_blank">hvriedel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On Sun, Sep 10, 2017 at 9:24 AM, Harendra Kumar<br>
<<a href="mailto:harendra.kumar@gmail.com">harendra.kumar@gmail.com</a>> wrote:<br>
> I could not find a function that repeats a value using a semigroup append. I<br>
> am looking for something like this:<br>
><br>
> srepeat :: Semigroup a => a -> a<br>
> srepeat x = xs where xs = x <> xs<br>
><br>
> Is it already available somewhere? Does it make sense to add it to<br>
> Data.Semigroup?<br>
<br>
</span>What you seem to be searching for looks more like what we know as<br>
`cycle :: [a] -> [a]`, and in fact there is its generalisation at<br>
<br>
<a href="http://hackage.haskell.org/package/base-4.10.0.0/docs/Data-Semigroup.html#v:cycle1" rel="noreferrer" target="_blank">http://hackage.haskell.org/<wbr>package/base-4.10.0.0/docs/<wbr>Data-Semigroup.html#v:cycle1</a><br>
<br>
hth<br>
</blockquote></div><br></div>