<div dir="ltr"><div>Ah, nice. You actually only need `const` in mapForallN. When I realised I needed it I added it<br></div><div>where it would provide the most power :-)</div><div><br></div><div>/ Ulf<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 3:08 PM Roman <<a href="mailto:effectfully@gmail.com">effectfully@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ulf, that's a cool solution.<br>
<br>
I simplified it a little by dropping the second argument from<br>
`forallN`: <a href="https://gist.github.com/effectfully/dab7fd1ad7c15d81d386f1aef6632725" rel="noreferrer" target="_blank">https://gist.github.com/effectfully/dab7fd1ad7c15d81d386f1aef6632725</a><br>
<br>
(it doesn't really simplify the logic, just the appearance)<br>
<br>
If you feel like doing another version of the challenge, it's possible<br>
to solve it by recursing on `n` only once at the term level, rather<br>
than twice in quadratic fashion (you do `mapForallN n` at each<br>
recursive step). Not that it matters though.<br>
<br>
Great solution!<br>
</blockquote></div>