From: sdieselil@... (sdieselil) Date: 2003-03-26T22:07:38+09:00 Subject: How can one implement composition of functions in Ruby? Hi I'm deliberating about what language to choose: Ruby or Python. One of the most important issues for me is the ability to write in a functional style of programing. So far I saw than python supports it more but may be I'm wrong? Here comes the question: how can I implement composition of functions in Ruby,i.e. how can I write a function that takes two other functions as arguments and returns a function that composes them? Here is a way to do it in python: def compose(f,g): return lambda x: f(g(x))