In Scala you can just do:
employees.filter( _.isPartTime )
And it runs in the same virtual machine.
employees.filter( _.isPartTime )
And it runs in the same virtual machine.
[e for e in employees if e.isPartTime()]
You can even push it further:
[e for e in employees if e.isPartTime() or e.lazy() or e.havePassiveIncomeAlready()]
and further:
[e for e in employees if e.isPartTime() or e.lazy() or e.havePassiveIncomeAlready() or e in [exec for exec in BoardofDirector.all() if exec.haveTooManyPortfolio()]]
Above is your friendly neighborhood List Comprehension available since Jython 2.0
employees.find_all &:isPartTime
Crikey, should buy a book...
employees.findAll { it.isPartTime() }
(filter :part-time? employees)