I've finally gotten around to learning Lisp/functional programming. However, what I've noticed is that I'm trying to bring ideas back into JavaScript.
Example
Before
var myPlacemark,
myLineString;
myLineString = ge.createLineString('');
myLineString.setLatitude(100);
myLineString.setLongitude(-100);
myPlacemark = ge.createPlacemark('');
myPlacemark.setGeometry(placemark);
After
var myPlacemark;
myPlacemark = (function(point, placemark){
point.setLatitude(100);
point.setLongitude(-100);
placemark.setGeometry(point);
return placemark;
})(ge.createPoint(''), ge.createPlacemark(''));
Is there any reason I shoudn't be doing it the 2nd way?