Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Predicate = Any => Boolean
- def filter(lista: List)(p: Predicate) = {
- if(p(lista)) filter(lista.tail)(p)
- else List.empty
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement