Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 600 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 600 Bytes

Parses simple S-Expressions into ALang

Build Status

An example for a standalone ohua module using the lisp-like syntax

(ns some_ns)


(require sf [ohua.math [add isZero]])
(require algo [some.sn [myalgo]])

(defalgo sqare [x]
    (add x x))

(defalgo algo1 [someParam]
    (let [a (square (myalgo someParam)
          coll0 (ohua.lang/smap (fn [i] (square i)) coll)]
    (if (isZero a)
        coll0
        a)))

(defalgo main [param]
    (algo0 param))