We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#I'm sorry for my bad English.
I want to rewrite vector or matrix in component-wise for statement, but now neo doesn't support that.
When we rewrite some component of a vector, now we can do that with the following code .
import neo var vec = vector([1, 2, 3]) for i in 0..<vec.len: vec[i] = 0 echo vec #result in [0, 0, 0]
Of corse, this code is enough work.
However, the following code is more useful for our neo life.
import neo iterator mitems[T](a: var Vector[T]): var T = var cnt = 0 while cnt < a.len: yield a[cnt] cnt.inc var vec = vector([1, 2, 3]) for elem in vec.mitems: elem = 0 echo vec #result in [0, 0, 0]
'mitems' is an iterator which is implemented for seq, array and etc..., but now it is not implemented for either vector or matrix.
I wish 'mitems' is implemented for vector and matrix.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#I'm sorry for my bad English.
I want to rewrite vector or matrix in component-wise for statement, but now neo doesn't support that.
When we rewrite some component of a vector, now we can do that with the following code .
Of corse, this code is enough work.
However, the following code is more useful for our neo life.
'mitems' is an iterator which is implemented for seq, array and etc..., but now it is not implemented for either vector or matrix.
I wish 'mitems' is implemented for vector and matrix.
The text was updated successfully, but these errors were encountered: