Hello,
I’ve been working with finite fields in racket, and although I solved my actual
problem (numbers were too large for (modulo (expt)), using modular-expt, I had
a question when I looked at modulo-expt, which uses what appeared to be infix
operators:
> (define (modular-expt* n a b)
(cond [(b . < . 0) (raise-argument-error 'modular-expt "Natural" 1 a b n)]
[(b . = . 0) (if (n . = . 1) 0 1)]
…
Is there some actual advantage to using infix operators in racket, other than
readability for those not used to LISP-like languages? I actually found it
highly confusing at first, as I couldn’t find much documentation describing
this usage
(https://docs.racket-lang.org/guide/Pairs__Lists__and_Racket_Syntax.html gives
only a brief mention at the end).
- johnk
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/3A3DE037-90EF-47E5-91C5-C948647B5B94%40gmail.com.