Created
October 2, 2016 07:14
-
-
Save dikarel/6888eeb795993a0f00bf87d9eac60b71 to your computer and use it in GitHub Desktop.
HackerRank utilities
This file contains 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
// Minified one-liner | |
var main=d=>{var l=[];return require('readline').createInterface({input:process.stdin}).on('line',i=>l.push(i)).on('close',()=>d(l))} | |
// Example | |
main(lines => { | |
console.log('My lines are', lines) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment