diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-03-27 15:22:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-03-27 15:22:46 -0700 |
| commit | a1849da175765350e013bdeecfa4e0ad3c066937 (patch) | |
| tree | 616a115790271757148044e2b3228fb715c00726 /lib/core/math.nom | |
| parent | bb07e6724118c431c3beed4060776678128905a1 (diff) | |
Autoformat (mostly just to do with the new
blank-line-after-end-of-multi-indent-block rule
Diffstat (limited to 'lib/core/math.nom')
| -rw-r--r-- | lib/core/math.nom | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/core/math.nom b/lib/core/math.nom index 9b53385..945ad13 100644 --- a/lib/core/math.nom +++ b/lib/core/math.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### This file defines some common math literals and functions @@ -19,6 +18,7 @@ external: $nan = (NaN) unless ($nan != $nan): fail "NaN failed" + [infinity, inf] all compile to "math.huge" [not a number, NaN, nan] all compile to "(0/0)" [pi, Pi, PI] all compile to "math.pi" @@ -73,12 +73,14 @@ external: for $ in $items: unless $: return (no) + return (yes) [not all of $items, not all $items] all parse as (not (all of $items)) [any of $items, any $items] all mean: for $ in $items: if $: return (yes) + return (no) [none of $items, none $items] all parse as (not (any of $items)) @@ -123,6 +125,7 @@ external: if (($best == (nil)) or ($key < $best_key)): $best = $item $best_key = $key + return $best (max of $items by $item = $value_expr) parses as @@ -134,6 +137,7 @@ external: if (($best == (nil)) or ($key > $best_key)): $best = $item $best_key = $key + return $best test: |
