Skip to content

divs1210/maya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maya

A Clojure(Script) DSL for math and numeric work

Leiningen: [maya "1.1.0-SNAPSHOT"] Read the introductory blog-post.

Usage

Expressions are always evaluated from left to right.

(require '[maya.core :refer :all]
         '[maya.util :refer :all])

(defn quadratic 
  [^double a ^double b ^double c]
  (|> 4 * a * c :as d,
      b * b - d ** 0.5 :as D,
      2 * a :as t, (- b) :as -b,
     -b + D / t :as x1,
     -b - D / t :as x2,
    [x1 x2]))

(quadratic 1 2 -3) ;=> [1.0 -3.0]

License

Copyright © 2015 Divyansh Prakash

Distributed under the Eclipse Public License version 1.0

About

A Clojure DSL for math and numerical work

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages