replace prime (') with 1
This commit is contained in:
parent
f166481ccb
commit
7c8b83a67f
24
demo.modal
24
demo.modal
|
@ -31,9 +31,9 @@
|
|||
<> ((decimal (1 (0 (0 (1 ())))))) (9)
|
||||
|
||||
-- reverse ()-terminated list
|
||||
<> (reverse ?x) (reverse' () ?x)
|
||||
<> (reverse' ?a ()) (?a)
|
||||
<> (reverse' ?a (?h ?t)) (reverse' (?h ?a) ?t)
|
||||
<> (reverse ?x) (reverse1 () ?x)
|
||||
<> (reverse1 ?a ()) (?a)
|
||||
<> (reverse1 ?a (?h ?t)) (reverse1 (?h ?a) ?t)
|
||||
|
||||
-- ( to integer )
|
||||
<> ((int ?*)) ((sum f (one) g reverse (?*)))
|
||||
|
@ -133,10 +133,10 @@
|
|||
<> (dec (0 ())) (#err)
|
||||
<> (dec (1 ())) ((0 ()))
|
||||
<> (dec (1 ?t)) ((0 ?t))
|
||||
<> (dec (0 ?t)) (dec' (0 ?t))
|
||||
<> (dec' (1 ())) (())
|
||||
<> (dec' (1 ?t)) ((0 ?t))
|
||||
<> (dec' (0 ?t)) ((1 dec' ?t))
|
||||
<> (dec (0 ?t)) (dec1 (0 ?t))
|
||||
<> (dec1 (1 ())) (())
|
||||
<> (dec1 (1 ?t)) ((0 ?t))
|
||||
<> (dec1 (0 ?t)) ((1 dec1 ?t))
|
||||
|
||||
-- ( inc )
|
||||
<> ((inc ())) ((1 ()))
|
||||
|
@ -181,12 +181,12 @@
|
|||
<> ((divmod6 ?x ?y ?s ?m ?d #gt)) ((divmod4 ?x ?y ?s ?m ?d))
|
||||
|
||||
-- ( floor divison )
|
||||
<> ((div ?x ?y)) ((div' (divmod ?x ?y)))
|
||||
<> ((div' (?q ?r))) (?q)
|
||||
<> ((div ?x ?y)) ((div1 (divmod ?x ?y)))
|
||||
<> ((div1 (?q ?r))) (?q)
|
||||
|
||||
-- ( remainder )
|
||||
<> ((mod ?x ?y)) ((mod' (divmod ?x ?y)))
|
||||
<> ((mod' (?q ?r))) (?r)
|
||||
<> ((mod ?x ?y)) ((mod1 (divmod ?x ?y)))
|
||||
<> ((mod1 (?q ?r))) (?r)
|
||||
|
||||
-- (bstr (mul (int 2399) (int 3499)))
|
||||
(str (int 1234567))
|
||||
(str (int 12345))
|
||||
|
|
Loading…
Reference in New Issue