Email list hosting service & mailing list manager

Comparator syntax if<=> John Cowan (02 Nov 2015 04:12 UTC)
Re: Comparator syntax if<=> Kevin Wortman (02 Nov 2015 18:51 UTC)
Re: Comparator syntax if<=> John Cowan (04 Nov 2015 06:23 UTC)

Comparator syntax if<=> John Cowan 02 Nov 2015 04:11 UTC

Dave Wortman asked me to restore the syntax keyword `if3` from SRFI 114.
Its normal syntax is
(if (comparison-procedure obj1 obj2) less-than equal-to-greater-than).
Like `if`, it expands to just one of the arms of the conditional, but
there are three of them.  However, there are no comparison procedures
in SRFI 128, so I've changed the syntax to
(if<=> [comparator] obj1 obj2 less-than equal-to greater-than).
The name is not ideal, but at least it's different enough to avoid
confusion.

Hopefully this variant will serve Dave's need.

Any comments?

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
Kill Gorgun!  Kill orc-folk!  No other words please Wild Men.  Drive away
bad air and darkness with bright iron!   --Ghan-buri-Ghan