11
May
08

Javascript Revelations #1

I’m starting to find out that javascript isn’t a crappy language at all. Did you know it’s closer to lisp than it is to Java?.

Heres currying in javascript.

>>> var c = function (b) { return function (a) { return b + a;}};
>>> var add5 = c(5)
>>> add5(3)
8
Advertisement

0 Responses to “Javascript Revelations #1”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.