Skip to content

saaserp/plum

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plum Build Status

Yet another lisp-like programming language.

Overview

;; functions
(+ 1 2 3 4 5 6 7 8 9 10)
(define inc (fn* [n] (+ n 1)))

;; apply
(apply + (list 1 2 3 4 5))

;; lambda
((fn* [a b] (+ a b)) 1 2)

(define max 
        (fn* [l] 
            (if (= (count l) 1) 
                (first l) 
                (if (> (first l) (max (rest l)))
                    (car l)
                    (max (cdr l))))))
;; macros

(defmacro unless (fn* [prd a b] `(if (not ~prd) ~a ~b)))

(defmacro defn (fn* [name args body] `(define ~name (fn* ~args ~body))))
`))

;; apply

(funcall + 1 2 3)
(apply + (list 1 2 3))

Install

1. install readline
sudo apt-get install libedit-dev

2. install this repo

go install github.com/sllt/plum


目标

  • 支持宏
  • 尾递归优化
  • 并发
  • 可扩展

About

a lisp-like language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.9%
  • OpenEdge ABL 2.1%