Remainder

From mojo_puzzler
Revision as of 15:54, 17 November 2023 by Gneale (talk | contribs) (Created page with "===== Return to: Chialisp ===== ===== Return to: Additional Functions ===== (mod (x y) (defun remainder (x y) (r (divmod x y)) ) (remainder x y) ) ==Example Usage:== brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 6 (divmod 5 11)) 1))' '(10 3)' 1 brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 6 (divmod 5 11)) 1))' '(10 4)' 2")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Return to: Chialisp
Return to: Additional Functions
(mod (x y)
    (defun remainder (x y)
      (r (divmod x y))
      )
    (remainder x y)
    )

Example Usage:

brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 6 (divmod 5 11)) 1))' '(10 3)'

1

brun '(a (q 2 2 (c 2 (c 5 (c 11 ())))) (c (q 6 (divmod 5 11)) 1))' '(10 4)'

2