Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/howeyc/ligo
Basics of Lisp in Go
https://github.com/howeyc/ligo
Last synced: about 1 month ago
JSON representation
Basics of Lisp in Go
- Host: GitHub
- URL: https://github.com/howeyc/ligo
- Owner: howeyc
- License: isc
- Created: 2012-10-13T00:53:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-26T00:58:33.000Z (almost 12 years ago)
- Last Synced: 2024-07-21T00:34:03.951Z (about 2 months ago)
- Language: Go
- Size: 133 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Basics of Lisp In Go
[GoDoc](http://go.pkgdoc.org/github.com/howeyc/ligo)
Very early stages!!
Example:
```go
func IntAdd(vals ...interface{}) interface{} {
var result int64
for _, val := range vals {
v := reflect.ValueOf(val)
intVal := v.Int()
result += intVal
}
return result
}func main() {
list1 := ligo.List(1, 2, 3, 5)
vec1 := ligo.Vector(1, 2, 3, 5)
fmt.Printf("Add: %d\n", ligo.Reduce(IntAdd, list1))
fmt.Printf("Add: %d\n", ligo.Reduce(IntAdd, vec1))
}
```[![Build Status](https://secure.travis-ci.org/howeyc/ligo.png?branch=master)](http://travis-ci.org/howeyc/ligo)