Geohash: Difference between revisions
Content added Content deleted
m (→{{header|jq}}: simplify) |
(→{{header|jq}}: fix) |
||
Line 410: | Line 410: | ||
def stream: |
def stream: |
||
recurse(if . >= base then ./base|floor else empty end) | . % base ; |
recurse(if . >= base then ./base|floor else empty end) | . % base ; |
||
[stream] | reverse |
[stream] | reverse |
||
| if base < 10 then map(tostring) | join("") |
| if base < 10 then map(tostring) | join("") |
||
elif base <= 36 then map(if . < 10 then 48 + . else . + 87 end) | implode |
elif base <= 36 then map(if . < 10 then 48 + . else . + 87 end) | implode |