From cf0b648d20559a3dcf552360b01ff33d6d0f2f2c Mon Sep 17 00:00:00 2001 From: djoio <47397180+djoio@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:52:01 -0400 Subject: [PATCH] Update 1a.md update ++ div and ++ dvr to latest source code --- content/reference/hoon/stdlib/1a.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/content/reference/hoon/stdlib/1a.md b/content/reference/hoon/stdlib/1a.md index f856748..5ad6c28 100644 --- a/content/reference/hoon/stdlib/1a.md +++ b/content/reference/hoon/stdlib/1a.md @@ -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