You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah! OK, I see, fold_n doesn't work because you need the prefix. So do all the built in list functions work as for operators? If so, we just need to say that.
Some list functions are automatically imported, while the rest is needed to be imported explicitly. This is not documented, but you can see stuff that are automatically imported here.
We could use a list of the built-in valid for operators in addition to map, filter and fold.
I just wrote one for fold_n (https://code.pyret.org/editor#share=11xDUUtBkp-FtsvXGV3izsA3sOeJhY89U&v=be0f222) for myself and was just going to start on fold2 when I discovered to my surprise that it already works. I couldn't find the relevant code in the Pyret source tree.
The longer explanation of for operators should also be moved from the tour to section 2.1.
The text was updated successfully, but these errors were encountered: