Leiningen: [maya "1.1.0-SNAPSHOT"]
Read the introductory blog-post.
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]
Copyright © 2015 Divyansh Prakash
Distributed under the Eclipse Public License version 1.0