I\'m trying to create a function on the fly that would return one constant value.
In JavaScript and other modern imperative languages I would use closures:
http://www.emacswiki.org/emacs/FakeClosures