Guest User

Untitled

a guest
Apr 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. groovy:000> (1..6).collect { it > 1 && it < 4 }
  2. ===> [false, true, true, false, false, false]
  3.  
  4. groovy:000> (1..6).find { it > 1 && it < 4 }
  5. ===> 2
  6.  
  7. groovy:000> (1..6).findAll { num -> num > 1 && num < 4 }
  8. ===> [2, 3]
Add Comment
Please, Sign In to add comment