Repository navigation
Add array_fold builtin function - #145
Conversation
fbf5615 to
e95bd7d
Compare
You are describing a builtin function, not a macro. A SimplicityHL macro is a notation that expands to SimplicityHL code, not to Simplicity code. At this point in time, I think it's not desirable to add macros to SimplicityHL. They make it harder to reason about the code. Let's refactor the PR to clarify that |
e95bd7d to
8c4fd1b
Compare
There was a problem hiding this comment.
ACK 8c4fd1b Looks good to me, but canndrew or apoelstra should also review this
This module was introduced in BlockstreamResearch#145 as a public module. But actually it is only ever used by the compiler, and it doesn't really make sense outside the compile because of its use of `ProgNode`. We may want to later make the builtins module be an extension trait of Constructible or something, but as long as it depends on ProgNode it should not be public (and it cannot be public, after the next commit).
This PR adds
array_foldsimilar to list folding, but for arbitrary array length.Also added relevant section to the book, and VSCode syntax.