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
#ifndef MEMOIZATOR | |
#define MEMOIZATOR | |
#include <tuple> | |
#include <map> | |
template<class R, class... Args> | |
class Memoizator { | |
typedef std::tuple<Args...> tuple; | |
public: |
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
(function(){ | |
var _utils = { // String.prototype.utils | |
append : function(tail){ | |
return this + tail; | |
} | |
}, | |
utils = {}, // фронтэнд. на этот объект будут навешены геттеры. | |
// на _utils геттеры вешать нельзя т.к. тогда мы не сможем (вроде как) добраться до методов | |
self = null, // тут будет контекст | |
generateGetter = function(fnc){ // это геттер |
NewerOlder