This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isEven :: Number -> Boolean | |
isEven 0 = false | |
isEven 1 = false | |
isEven 2 = true | |
isEven n = isEven(n-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |