goscheme

command module
v0.0.0-...-e19ec15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

README

#goscheme This is a Lisp-y language interpreter implemented in Go. It also contains some Go concepts, like channels and goroutines for concurrent execution.

##Examples (define c (go (+ 1 1)))

Creates a new goroutine which calculates the value of 1+1. The result is sent on the channel c.

(define r (-> c))

Receives the value from the earlier calculation and stores the value in r.

(define c (chan))
(define ex (lambda (x) (begin (<- c x) (ex (+ x 1)))))
(go (ex 0))

Defines and executes a recursive function that runs forever and repeatedly sends numbers on the channel c. Channels are blocking, so the function will wait until another routine is ready to receive before continuing with the next iteration.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lib
goscheme - a Lisp interpreter in Go Copyright (C) 2015 Jack Bister This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
goscheme - a Lisp interpreter in Go Copyright (C) 2015 Jack Bister This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL