Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/Binary-digits/Red/binary-digits.red
Normal file
7
Task/Binary-digits/Red/binary-digits.red
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Red []
|
||||
|
||||
foreach number [5 50 9000] [
|
||||
;; any returns first not false value, used to cut leading zeroes
|
||||
binstr: form any [find enbase/base to-binary number 2 "1" "0"]
|
||||
print reduce [ pad/left number 5 binstr ]
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue