Jump to content

Self-describing numbers: Difference between revisions

Added Arturo implementation
m (→‎{{header|Phix}}: syntax coloured, made p2js compatible)
(Added Arturo implementation)
Line 410:
3211000 -> true
3211004 -> false</pre>
 
=={{header|Arturo}}==
 
<lang rebol>selfDescribing?: function [x][
digs: digits x
loop.with:'i digs 'd [
if d <> size select digs 'z [z=i]
-> return false
]
return true
]
 
print select 1..22000 => selfDescribing?</lang>
 
{{out}}
 
<pre>1210 2020 21200</pre>
 
=={{header|AutoHotkey}}==
1,532

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.