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
def recursive_subsets(array) | |
return [] if array.empty? | |
inner_array = array.first | |
if array.length == 1 | |
return inner_array.map { |item| [item] } | |
end | |
results = [] |
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
interface Collection { | |
push(value: any): void; | |
pop(): any; | |
peek(): any; | |
isEmpty(): boolean; | |
} | |
class Stack implements Collection { | |
top: any |
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.Views.ViewBase = Backbone.View.extend({ | |
childViews: [], | |
addChild: function(view) { | |
// etc | |
}, | |
close: function() { | |
this.childViews.forEach(function(childView) { | |
childView.close(); |