Last active
April 5, 2019 15:09
-
-
Save oliwer/36ee5d0bcd542e7c2f764f3510fda4e7 to your computer and use it in GitHub Desktop.
Diamond in K7 (shakti)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ diamond challenge in K7 | |
/ http://badcode.rocks/2019/060/diamond/ | |
/ usage: k diamond.k Z | |
ci:(*.z.x(1))-65 / get first arg as int (A=0) | |
diam:{ch:`c$x+65;ch,((0|x+x-1)#" "),(x>0)#ch} | |
{pad:(ci-x)#" ";pad,diam[x],pad}'(!ci+1),|!ci | |
\\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment