simplify: no distinction between generic types and 'normal' types.
This commit is contained in:
parent
b4826605af
commit
a664ddac8a
27 changed files with 535 additions and 360 deletions
|
|
@ -25,3 +25,15 @@ const _mapRecursiveStructure = mapping => transform => root => {
|
|||
};
|
||||
|
||||
export const mapRecursiveStructure = _mapRecursiveStructure(new Map());
|
||||
|
||||
export const memoize = callback => {
|
||||
let called = false
|
||||
let result;
|
||||
return () => {
|
||||
if (!called) {
|
||||
result = callback();
|
||||
called = true;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue