Skip to content

Instantly share code, notes, and snippets.

View paf31's full-sized avatar

Phil Freeman paf31

View GitHub Profile
module Main where
import Prelude
import Parsing
import Either
foreign import data JSON :: *
foreign import toJSON "function toJSON (obj) { return obj; }" :: forall a. a -> JSON
foreign import showJSON "function showJSON (obj) { return JSON.stringify(obj); }" :: JSON -> String
@paf31
paf31 / code
Created August 14, 2014 17:50 — forked from emiaj/code
let isEven :: Number -> Boolean
isEven 0 = false
isEven 1 = false
isEven 2 = true
isEven n = isEven(n-1)