MF Bliki: Closure
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
URL Tag Cloud
Bookmark History
Saved by 12 people (-1 private), first by anonymouse user on 2006-03-02
- Iskaldur on 2008-12-30 - Tags ruby , closures , functional-programming
- Dijoje on 2008-08-26 - Tags closure , ruby , programming , python , javascript , boo
- Riyaz on 2008-06-13 - Tags java , closures , patterns
- Bamanzi on 2008-03-19 - Tags programming , closure , ruby , python
- Kenyth on 2008-03-10 - Tags closure , article , programming language , ruby , python , java
Public Sticky notes
Highlighted by benxshen
In a language that has Closures, in this case Ruby, I'd write this.
def managers(emps)
return emps.select {|e| e.isManager}
end
Highlighted by benxshen
Highlighted by kenyth
Highlighted by kenyth
Highlighted by yorkjong
Highlighted by kenyth
Highlighted by yorkjong
Highlighted by kenyth
Highlighted by yorkjong
Highlighted by kenyth
Highlighted by kenyth
Highlighted by yorkjong
Highlighted by kenyth
Highlighted by yorkjong
Highlighted by kenyth
Another common use is the 'execute around method', such as when processing a file.
File.open(filename) {|f| doSomethingWithFile(f)}
Highlighted by yorkjong


Public Comment