Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Exponentiation-order/EchoLisp/exponentiation-order.l
Normal file
16
Task/Exponentiation-order/EchoLisp/exponentiation-order.l
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
;; the standard and secure way is to use the (expt a b) function
|
||||
(expt 5 (expt 3 2)) ;; 5 ** ( 3 ** 2)
|
||||
→ 1953125
|
||||
(expt (expt 5 3) 2) ;; (5 ** 3) ** 2
|
||||
→ 15625
|
||||
|
||||
;; infix EchoLisp may use the ** operator, which right associates
|
||||
(lib 'match)
|
||||
(load 'infix.glisp)
|
||||
|
||||
(5 ** 3 ** 2)
|
||||
→ 1953125
|
||||
((5 ** 3) ** 2)
|
||||
→ 15625
|
||||
(5 ** (3 ** 2))
|
||||
→ 1953125
|
||||
Loading…
Add table
Add a link
Reference in a new issue