Skip to content

Instantly share code, notes, and snippets.

@josher19
Created June 21, 2012 10:57
Show Gist options
  • Save josher19/2965126 to your computer and use it in GitHub Desktop.
Save josher19/2965126 to your computer and use it in GitHub Desktop.
Start of docs for livescript
module.exports = {
"<-!": {
"definition": "Suppress returns on backcalls.",
"details": "Temporary variable to be assigned in callback on the left and function to call on the right. Returns undefined (void). ",
"example": "val <-! $.ajax 'examples/helloworld.roy'\nval2 <-! $.ajax 'examples/alias.roy'\nconsole.log val + val2",
"compilesTo": "$.ajax('examples/helloworld.roy', function(val){\n $.ajax('examples/alias.roy', function(val2){\n console.log(val + val2);\n });\n});",
"see": [
"!",
"<-",
"backcall",
"undefined",
"void"
],
"link": null,
"help": "<-!"
},
"->": {
"definition": "Operator to define a function.",
"details": "Arguments (in parenthesis) on the left and returned function body on right. ",
"syntax": "(\"ParameterList\")\"? \"->\" Block",
"example": " squareplus = (x) -> x = x + 1; x * x \n squareplus(2) == 9",
"link": "http://gkz.github.com/LiveScript/#functions",
"help": "->"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment