Update 1a.md

update ++  div and ++  dvr to latest source code
This commit is contained in:
djoio 2023-08-02 17:52:01 -04:00 committed by GitHub
parent 83b662a286
commit cf0b648d20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,14 +239,8 @@ An [`atom`](/reference/glossary/atom).
```hoon ```hoon
++ div ++ div
~/ %div ~/ %div
|: [a=`@`1 b=`@`1]
^- @ ^- @
~_ leaf+"divide-by-zero" -:(dvr a b)
?< =(0 b)
=+ c=0
|-
?: (lth a b) c
$(a (sub a b), c +(c))
``` ```
#### Examples #### Examples
@ -303,9 +297,13 @@ A cell of [`atoms`](/reference/glossary/atom).
```hoon ```hoon
++ dvr ++ dvr
~/ %dvr ~/ %dvr
|= [a=@ b=@]
^- [p=@ q=@] ^- [p=@ q=@]
[(div a b) (mod a b)] ~_ leaf+"divide-by-zero"
?< =(0 b)
=+ c=0
|-
?: (lth a b) [c a]
$(a (sub a b), c +(c))
``` ```
#### Examples #### Examples