Sha256: 2a5b0985ed6111a1a4aed7e892c0dcd1f0f8a9146a49f0eea6973c37cd386504
Contents?: true
Size: 182 Bytes
Versions: 311
Compression:
Stored size: 182 Bytes
Contents
function trinary_to_decimal(str::AbstractString) typeof(match(r"^[0-2]+$", str)) == Void && return 0 mapreduce(i->(i[2]-'0')*3^i[1], +, zip(0:length(str), reverse(str))) end
Version data entries
311 entries across 311 versions & 1 rubygems