-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make mapIt work on openArray's #8543
Conversation
Maybe it's better to introduce a more general |
Like this? EDIT cool, |
lib/pure/collections/sequtils.nim
Outdated
@@ -635,6 +635,20 @@ template mapIt*(s, typ, op: untyped): untyped = | |||
result.add(op) | |||
result | |||
|
|||
macro evalOnce(exp: untyped, varName: static[string]): untyped = |
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.
Why is varName
a string?
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.
Because genSym
likes strings? I can probably use a untyped
argument and then stringify it if you don't like the string thing.
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.
Yeah, please do that.
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.
Done, the bootrstrapping is still hosed due to the missing symKind
.
So use |
Fine, this is now ready. |
No description provided.