Rewrite Rule to Correct "Block immediately evaluated"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Rewrite Rule to Correct "Block immediately evaluated"

Runar Jordahl
Is there any way to rewrite code that fails the Code Critic rule
"Block immediately evaluated"?

Code of this form, typically looks like this:

[some code] value

Value is sent immediately to the block. Therefore the statement can be
rewritten like this:

some code

Kind regards
Runar
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Rewrite Rule to Correct "Block immediately evaluated"

David Lattimore
On 11/10/11 05:33, Runar Jordahl wrote:
> Is there any way to rewrite code that fails the Code Critic rule
> "Block immediately evaluated"?

How about something like the following?

replace:
| `@vars |
`@.before.
[| `@newvars |
`@.a] value.
`@.after

with:
| `@vars `@newvars |
`@.before.
`@.a.
`@.after

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc