Named arguments (parameters) in functions or closuresBy neokrates, written on June 3, 2010 |
groovy snippet |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Rate it
Ad
Poll
Loading ...
Most popular search terms:
Stats
-
Since publication, this page was visited 135 time(s).
1 2 3 4 5 6 | final launchRemoteControl ( p=[p1 : 'Micro', p2:"And", p3 : "Soft" ]) { println p.p1 + p.p2 + p.p3 } launchRemoteControl() launchRemoteControl(p1:'Soft', p2:'', p3:'Micro') |
Currently, there is a limitation that if you skip one name, it will be missed in function as well (because you actually replace default map as whole)
launchRemoteControl(p1:'Soft', p3:'Micro')
|
TAGS
|
|
RELATED
|
Pages
Posts
|
|
SOCIAL
|


















