Hello Chuck,
I've been looking into the docs and I haven't found anything about list comprehensions or anything similar.
I just tried compiling a simple case and it didn't work.
Are they implemented or have you plans to do it?
By the way, congratulations for the first release!
neuruss
Forums
1st question: List comprehensions?
2 posts
• Page 1 of 1
Re: 1st question: List comprehensions?
Hi neuruss,
Thanks.
Yes, Cobra has them:
See here: http://cobra-language.com/docs/manual/expressions/for.html
(The manual needs a real sidebar with one-click access to the topics.)
Note that the ordering means that when Cobra does have IDE support, you will get "intellisense" on the expression you are making:
There is a bug in the current release that you cannot assign the expression back to the same variable like so:
That is already fixed and there will a 0.7.x release by Monday morning.
-Chuck
Thanks.
Yes, Cobra has them:
See here: http://cobra-language.com/docs/manual/expressions/for.html
(The manual needs a real sidebar with one-click access to the topics.)
Note that the ordering means that when Cobra does have IDE support, you will get "intellisense" on the expression you are making:
print for name in names get name._
There is a bug in the current release that you cannot assign the expression back to the same variable like so:
names = for name in names where name.trim.length
That is already fixed and there will a 0.7.x release by Monday morning.
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 27 guests