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
app.registry.add('css', 'broccoli-compass', 'scss', { | |
toTree: function(tree, inputPath, outputPath, options) { | |
// broccoli-compass doesn't like leading slashes | |
if (inputPath[0] === '/') { inputPath = inputPath.slice(1); } | |
tree = mergeTrees([ | |
tree, | |
'public' | |
], { | |
description: 'TreeMerger (stylesAndVendorAndPublic)' |
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
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |