Make max and min apply aliases
This commit is contained in:
@@ -52,15 +52,9 @@ class Macros {
|
|||||||
// the (apply [func] [args]) macro keeps its own list of aliases for the math operators
|
// the (apply [func] [args]) macro keeps its own list of aliases for the math operators
|
||||||
// that can't just be function aliases because they emulate &rest behavior
|
// that can't just be function aliases because they emulate &rest behavior
|
||||||
var opAliases = [
|
var opAliases = [
|
||||||
"+" => "Prelude.add",
|
"+" => "Prelude.add", "-" => "Prelude.subtract", "*" => "Prelude.multiply", "/" => "Prelude.divide", ">" => "Prelude.greaterThan",
|
||||||
"-" => "Prelude.subtract",
|
">=" => "Prelude.greaterEqual", "<" => "Prelude.lessThan", "<=" => "Prelude.lesserEqual", "=" => "Prelude.areEqual", "max" => "Prelude.max",
|
||||||
"*" => "Prelude.multiply",
|
"min" => "Prelude.min"
|
||||||
"/" => "Prelude.divide",
|
|
||||||
">" => "Prelude.greaterThan",
|
|
||||||
">=" => "Prelude.greaterEqual",
|
|
||||||
"<" => "Prelude.lessThan",
|
|
||||||
"<=" => "Prelude.lesserEqual",
|
|
||||||
"=" => "Prelude.areEqual"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
macros["apply"] = (wholeExp:ReaderExp, exps:Array<ReaderExp>, k) -> {
|
macros["apply"] = (wholeExp:ReaderExp, exps:Array<ReaderExp>, k) -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user