aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/r
diff options
context:
space:
mode:
authorEduardo Julian2018-07-30 23:40:48 -0400
committerEduardo Julian2018-07-30 23:40:48 -0400
commit748c868680683df1949f62aac274040ac5bf43da (patch)
tree67b3bd8fb402dfd00fc0ee472186fc79e6545ac7 /new-luxc/source/luxc/lang/translation/r
parent76b47564f89bac5eb6604da7bbb94aabb83d6d84 (diff)
Now implementing math functionality in stdlib instead of the compiler.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux28
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux47
2 files changed, 0 insertions, 75 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
index eab139f33..c17eb6738 100644
--- a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
@@ -329,33 +329,6 @@
(install "clip" (trinary text//clip))
)))
-## [[Math]]
-(def: (math//pow [subject param])
- Binary
- (|> subject (r.** param)))
-
-(def: (math-func name)
- (-> Text (-> Expression Expression))
- (function (_ input)
- (r.apply (list input) (r.global name))))
-
-(def: math-procs
- Bundle
- (<| (prefix "math")
- (|> (dict.new text.Hash<Text>)
- (install "cos" (unary (math-func "cos")))
- (install "sin" (unary (math-func "sin")))
- (install "tan" (unary (math-func "tan")))
- (install "acos" (unary (math-func "acos")))
- (install "asin" (unary (math-func "asin")))
- (install "atan" (unary (math-func "atan")))
- (install "exp" (unary (math-func "exp")))
- (install "log" (unary (math-func "log")))
- (install "ceil" (unary (math-func "ceiling")))
- (install "floor" (unary (math-func "floor")))
- (install "pow" (binary math//pow))
- )))
-
## [[IO]]
(def: (io//exit input)
Unary
@@ -446,7 +419,6 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge array-procs)
- (dict.merge math-procs)
(dict.merge io-procs)
(dict.merge atom-procs)
(dict.merge box-procs)
diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
index bed68a0a0..ba6a1241a 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
@@ -360,52 +360,6 @@
(install "clip" (trinary text//clip))
)))
-## [[Math]]
-(do-template [<name> <method>]
- [(def: <name>
- Unary
- (|>> (list) (ruby.apply <method>)))]
-
- [math//cos "Math.cos"]
- [math//sin "Math.sin"]
- [math//tan "Math.tan"]
- [math//acos "Math.acos"]
- [math//asin "Math.asin"]
- [math//atan "Math.atan"]
- [math//exp "Math.exp"]
- [math//log "Math.log"]
- )
-
-(do-template [<name> <method>]
- [(def: <name>
- Unary
- (ruby.send <method> (list)))]
-
- [math//ceil "ceil"]
- [math//floor "floor"]
- )
-
-(def: (math//pow [inputO paramO])
- Binary
- (ruby.pow paramO inputO))
-
-(def: math-procs
- Bundle
- (<| (prefix "math")
- (|> (dict.new text.Hash<Text>)
- (install "cos" (unary math//cos))
- (install "sin" (unary math//sin))
- (install "tan" (unary math//tan))
- (install "acos" (unary math//acos))
- (install "asin" (unary math//asin))
- (install "atan" (unary math//atan))
- (install "exp" (unary math//exp))
- (install "log" (unary math//log))
- (install "ceil" (unary math//ceil))
- (install "floor" (unary math//floor))
- (install "pow" (binary math//pow))
- )))
-
## [[IO]]
(def: (io//log messageO)
Unary
@@ -506,7 +460,6 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge array-procs)
- (dict.merge math-procs)
(dict.merge io-procs)
(dict.merge atom-procs)
(dict.merge box-procs)