Fix combined operators

This commit is contained in:
Přemysl Eric Janouch 2017-05-21 12:46:21 +02:00
parent e1ec59043e
commit b31526d6ba
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 4 additions and 4 deletions

8
ell.c
View File

@ -1230,12 +1230,12 @@ init_runtime_library (struct context *ctx) {
// FIXME: this "unless" is probably not going to work
{ "unless", "arg _cond _body; if (not (eval @_cond)) @_body" },
// TODO: we should be able to apply them to all arguments
{ "ne?", "arg _ne1 _ne2; not (eq? @_ne1 @_ne2))" },
{ "ge?", "arg _ge1 _ge2; not (lt? @_ge1 @_ge2))" },
{ "ne?", "arg _ne1 _ne2; not (eq? @_ne1 @_ne2)" },
{ "ge?", "arg _ge1 _ge2; not (lt? @_ge1 @_ge2)" },
{ "le?", "arg _le1 _le2; ge? @_le2 @_le1" },
{ "gt?", "arg _gt1 _gt2; lt? @_gt2 @_gt1" },
{ "<>", "arg _<>1 _<>2; not (= @_<>1 @_<>2))" },
{ ">=", "arg _>=1 _>=2; not (< @_>=1 @_>=2))" },
{ "<>", "arg _<>1 _<>2; not (= @_<>1 @_<>2)" },
{ ">=", "arg _>=1 _>=2; not (< @_>=1 @_>=2)" },
{ "<=", "arg _<=1 _<=2; >= @_<=2 @_<=1" },
{ ">", "arg _>1 _>2; < @_>2 @_>1" },
};