Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
drkameleon committed Sep 9, 2024
1 parent 0c18140 commit 28a32a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/isbn.art
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ action: function [str, params][
] -> return false

isIsbn10?: function [isbn][
; see: https://en.wikipedia.org/wiki/ISBN#ISBN-10_check_digit_calculation
if 10 <> size isbn -> return false
[s, t]: 0
loop 0..9 'i [
Expand All @@ -41,6 +42,7 @@ action: function [str, params][
]

isIsbn13?: function [isbn][
; see: https://rosettacode.org/wiki/ISBN13_check_digit#Arturo
if 13 <> size isbn -> return false
s: 0
loop.with:'i isbn 'n [
Expand Down

0 comments on commit 28a32a8

Please sign in to comment.