This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var concat = require('gulp-concat'); | |
| var sass = require('gulp-sass'); | |
| var minifyCss = require('gulp-minify-css'); | |
| var rename = require('gulp-rename'); | |
| var coffee = require('gulp-coffee'); | |
| var browserify = require('gulp-browserify') | |
| var paths = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bilby = require('bilby') | |
| loop1 = (n) -> | |
| inner = (acc, i) -> | |
| if(i is 0) | |
| bilby.done(acc) | |
| else | |
| bilby.cont( -> | |
| inner(acc + i, i - 1) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var trampoline = function (f) { | |
| while (f && f instanceof Function) { | |
| f = f.apply(f.context, f.args); | |
| } | |
| return f; | |
| } | |
| var thunk = function (fn) { | |
| return function () { | |
| var args = Array.prototype.slice.apply(arguments); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @user = self | |
| template = Tilt::ERBTemplate.new("#{Padrino.root}/api/views/mailers/welcome.erb").render(@user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object RecursiveSum extends App { | |
| println(sum(List(1, 2, 3, 10))) | |
| def sum(nums: List[Int]): Int = { | |
| @tailrec | |
| def sumTail(x: Int, xs: List[Int]): Int = xs match { | |
| case Nil => x | |
| case y :: ys => sumTail(x + y, ys) | |
| } | |
| sumTail(0, nums) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var util = require("util"); | |
| var obj1 = function () { | |
| this.color = "green"; | |
| this.type = "suv"; | |
| }; | |
| obj1.prototype.demo = 123; | |
| var obj2 = function () { |
NewerOlder