Skip to content

Instantly share code, notes, and snippets.


Karl-Oskar Rikås funrep

View GitHub Profile
jozefg / closconv.lhs
Last active Mar 27, 2021
Tutorial on Closure Conversion and Lambda Lifting
View closconv.lhs
This is my short-ish tutorial on how to implement closures in
a simple functional language: Foo.
First, some boilerplate.
> {-# LANGUAGE DeriveFunctor, TypeFamilies #-}
> import Control.Applicative
> import Control.Monad.Gen
> import Control.Monad.Writer
> import Data.Functor.Foldable
HeinrichApfelmus / GameLoop.hs
Created Oct 2, 2012
Game loop in reactive-banana
View GameLoop.hs
Implementation of an "industry strength" game loop with fixed time step
and variable fps.
See also
{-# LANGUAGE NoMonomorphismRestriction #-}
module Main where
BonsaiDen / tokenize.js
Created Feb 12, 2012
Small, simple, JS tokenizer in JS.
View tokenize.js
* Simple JavaScript tokenizer (not a full parser!!!)
* Portions taken from Narcissus by Brendan Eich <>.
/*jshint evil: true, regexdash: false, regexp: false */
var KEYWORDS = [