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
| module ImmArr: { | |
| /* Put this in the interface file */ | |
| type t<'a> | |
| let make: array<'a> => t<'a> | |
| let isEmpty: t<'a> => bool | |
| let head: t<'a> => option<'a> | |
| let tail: t<'a> => t<'a> | |
| let toArray: t<'a> => array<'a> | |
| let map: (t<'a>, 'a => 'b) => t<'b> | |
| let cons: (t<'a>, 'a) => t<'a> |
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 memorySizeOf(obj) { | |
| var bytes = 0; | |
| function sizeOf(obj) { | |
| if(obj !== null && obj !== undefined) { | |
| switch(typeof obj) { | |
| case 'number': | |
| bytes += 8; | |
| break; | |
| case 'string': |
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
| find ./ -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
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
| find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |