Remainder

From mojo_puzzler
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