disco
disco copied to clipboard
Make min/max prefix, and add infix operators like `↓` and `↑`
Infix max, min are weird and nonstandard.
While we're at it, could max
and min
just be standard library functions?
To define min
and max
as standard library functions depends on #179. For example:
min : a * a -> a [comparable a]
min(x,y) = {? x if x <= y, y otherwise ?}
Once we have #136 we could also define infix synonyms. I'm actually partial to Dijkstra's notation and ↓
and ↑
for min and max, respectively.
We shouldn't wait for #179; we should go ahead and make min
and max
prefix.
- A first pass would be to just remove them from
Syntax.Operators
and add them as prims. - Or, instead of removing them, we could change the syntax in
Syntax.Operators
to↓
and↑
. The tricky thing is that we need some ASCII syntax for them as well...