-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrays of anything #434
Arrays of anything #434
Conversation
…into generalize-arrays
…s into generalize-arrays
…to generalize-arrays
zokrates_core/src/flatten/mod.rs
Outdated
res.into_iter().map(|r| r.into()).collect() | ||
} | ||
|
||
/// Flatten a array selection expression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"an", if you wanna be nitpicky ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wanna try the github "suggest change" feature? :p
zokrates_core/src/flatten/mod.rs
Outdated
/// | ||
/// # Arguments | ||
/// | ||
/// * `symbols` - Available functions in in this context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove one "in"
zokrates_core/src/flatten/mod.rs
Outdated
/// | ||
/// # Arguments | ||
/// | ||
/// * `symbols` - Available functions in in this context | ||
/// * `statements_flattened` - Vector where new flattened statements can be added. | ||
/// * `expression` - `FieldElementArrayExpression` that will be flattened. | ||
fn flatten_field_array_expression( | ||
/// * `expression` - `ArrayExpression` that will be flattened. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 'expr'
Just to persist this here as well: My main take on that PR for now is that So after fixing the docs and potentially fixing some of the typos, this should be merged. |
In the current version, how we process indices of multidimensional array declarations is unlike in C/Java. See the following example:
Beyond being "established", the C/Java version is also aligned with the intuition of declaring and manipulating matrices. Hence, I would propose to change the implementation to mirror that behaviour. |
extension of #402 to any array content