Skip to content

Instantly share code, notes, and snippets.

class ForgottenPromise extends Error {
constructor(reason: string = "") {
super(reason);
Object.setPrototypeOf(this, ForgottenPromise.prototype);
}
}
class ForgettablePromise<T> implements Promise<T> {
readonly [Symbol.toStringTag]:string = "ForgettablePromise";
private readonly promise: Promise<T>;
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>ekko-lightbox</title>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="http://rawgithub.com/ashleydw/lightbox/master/dist/ekko-lightbox.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://rawgithub.com/ashleydw/lightbox/master/dist/ekko-lightbox.js"></script>
<script type="text/javascript">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>ekko-lightbox</title>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="http://rawgithub.com/ashleydw/lightbox/master/dist/ekko-lightbox.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://rawgithub.com/ashleydw/lightbox/master/dist/ekko-lightbox.js"></script>
<script type="text/javascript">
var seq1: Seq[String] = Seq("apple", "banana", "camel")
var seq2: Seq[(String, String)] = Seq( "green" -> "fruit", "yellow" -> "fruit", "brown" -> "animal" )
var iter = seq1.toIterator
seq2.map {s => (s._1, s._2, iter.next()) }