Skip to content

conor722/ts-scheme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To run the REPL:

  1. npm install
  2. npm run build
  3. npm start

Most basic Scheme syntax: https://www.scheme.com/tspl2d/grammar.html should work.

example (copy and paste to view output):

(define (map fn args)
    (cond ((empty? args) (list))
    (else (push-left (map fn (cdr args)) (fn (car args))))))

(map (lambda (x) (* x x)) (list 1 2 3 4))

The above declares a function called map which takes a function and a list of arguments, and then applies the function to each argument in the list.

It should return a list of the squares of each number in the passed in list.

About

Minimal scheme language that runs on node with a read-eval-print loop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors