Skip to content

Instantly share code, notes, and snippets.

@andreipaz
Created April 12, 2019 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreipaz/28bf4fd69939459e5d95dd52ecd4ca42 to your computer and use it in GitHub Desktop.
Save andreipaz/28bf4fd69939459e5d95dd52ecd4ca42 to your computer and use it in GitHub Desktop.
try {
newLove = life.find('love);
} catch (e) {
life.mistakes.push(e);
life
.mistakes()
.handleRejection((mistakes) => { life.learn(mistakes) })
} finaly {
life.sucks();
}
class Life extends Pleasure, Pain {
mistakes: [];
learn() {
this.mistakes.forEach((err) => {
err
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment