mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-08-17 09:40:33 +03:00
Update 1a.md
update ++ div and ++ dvr to latest source code
This commit is contained in:
parent
83b662a286
commit
cf0b648d20
@ -239,14 +239,8 @@ An [`atom`](/reference/glossary/atom).
|
||||
```hoon
|
||||
++ div
|
||||
~/ %div
|
||||
|: [a=`@`1 b=`@`1]
|
||||
^- @
|
||||
~_ leaf+"divide-by-zero"
|
||||
?< =(0 b)
|
||||
=+ c=0
|
||||
|-
|
||||
?: (lth a b) c
|
||||
$(a (sub a b), c +(c))
|
||||
-:(dvr a b)
|
||||
```
|
||||
|
||||
#### Examples
|
||||
@ -303,9 +297,13 @@ A cell of [`atoms`](/reference/glossary/atom).
|
||||
```hoon
|
||||
++ dvr
|
||||
~/ %dvr
|
||||
|= [a=@ b=@]
|
||||
^- [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
|
||||
|
Loading…
Reference in New Issue
Block a user