A programming language, a typed Lisp, a fun time.
Neblen> (let [incr (+ 1)] (incr (incr 10)))
12 : Int
Neblen> (let [twice (fn [f x] (f (f x)))] ((twice (+ 1)) 10))
12 : Int
Neblen> :t (fn [x] x)
(fn [x] x) : (-> a a)
Neblen> :t ((fn [x] x) (fn [y] (y true)))
((fn [x] x) (fn [y] (y true))) : (-> (-> Bool a) a)
First, download and install stack
.
cd ~/code/neblen
# Get GHC
stack install
stack build
To run the Neblen REPL:
stack ghci neblen:exe:neblen
>> main
stack test
# Install doctest
stack install doctest
stack exec doctest -- -isrc -Wall -fno-warn-type-defaults -fno-warn-unused-do-bind src/
Write You a Haskell by Stephen Diehl
Types and Programming Languages by Benjamin C. Pierce