Sha256: 43d1536cb99894a6aece9db1ef15d337c2eab825d8a19d5d35446a17f0373f61
Contents?: true
Size: 233 Bytes
Versions: 3
Compression:
Stored size: 233 Bytes
Contents
class String def palindrome?; self == reverse; end end class Integer def strictly_non_palindromic? return true if (0..4).include?(self) or self == 6 prime? and (2..(isqrt)).none?{|base| base(base).palindrome?} end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
numb-0.152.0 | lib/numb/strictly_non_palindromic.rb |
numb-0.138.0 | lib/numb/strictly_non_palindromic.rb |
numb-0.125.0 | lib/numb/strictly_non_palindromic.rb |