(def tr-fac (B (S (Phi (eq 0) cdr car)) (C B (Phi cons (Phi * car cdr) (B (C - 1) cdr)))))
-(def abstract-rec (B (B (B (C B cons))) (B (B (B B)) (B (B (B Z)) (C (B B (B B (B B (B S (C (C Phi cdr) car))))) (B (B (C B)) (B (C B (C B cdr)) (B (Phi cons) (C (C Phi car) cdr)))))))))
\ No newline at end of file
+(def abstract-rec (B (B (B (C B cons))) (B (B (B B)) (B (B (B Z)) (C (B B (B B (B B (B S (C (C Phi cdr) car))))) (B (B (C B)) (B (C B (C B cdr)) (B (Phi cons) (C (C Phi car) cdr)))))))))
+
+(def append (B (C (abstract-rec not (B (C B car) (C cons)) cdr)) reverse))
+
mkdir -p $(WEB_BUILD)/../static/repl
cp $(WEB_BUILD)/../kl.png $(WEB_BUILD)/../static/repl
cp $(WEB_BUILD)/../manifest.json $(WEB_BUILD)/../static/repl
+ cp $(WEB_BUILD)/../sw.js $(WEB_BUILD)/../static/repl
cp $(WEB_BUILD)/klrepl.data $(WEB_BUILD)/../static/repl
cp $(WEB_BUILD)/klrepl.js $(WEB_BUILD)/../static/repl
cp $(WEB_BUILD)/klrepl.wasm $(WEB_BUILD)/../static/repl
outzone.appendChild(outelt);
document.getElementById('replin').value = ""
});
+
+ if('serviceWorker' in navigator) {
+ console.log('registering');
+ navigator.serviceWorker.register('./sw.js')
+ .then(() => { console.log('sw reg'); });
+ }
+ else {
+ console.log('no sw in nav');
+ }
</script>
{{{ SCRIPT }}}
</body>
--- /dev/null
+
+self.addEventListener('install', (event) => {
+ event.waitUntil(
+ caches.open('klrepl').then((cache) => cache.addAll([
+ './',
+ './index.html',
+ './kl.png',
+ './klrepl.js',
+ './klrepl.wasm',
+ './klrepl.data',
+ ]))
+ )});
+
+self.addEventListener('fetch', (event) => {
+ event.respondWith(
+ caches.match(event.request).then((response) => response || fetch(event.request))
+ );
+});