Created
September 19, 2016 02:16
-
-
Save ConorOBrien-Foxx/7f840203180e4124b5a9a832bf1d97b5 to your computer and use it in GitHub Desktop.
asdf
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
f =: | , <.@% | |
q =: 0:`((, ; |) ; [ $: {:@f)@.(*@]) | |
k =: |. @: > @ }: @ q | |
boxofstr =: [: <;._1 ' ' , ": | |
pipe =: '|' joinstring boxofstr | |
roof =: (|:@,.~ ('- ' {~ [: <./\ '|' i. ]))@pipe | |
boxroof =: roof @ ; | |
graph =: [: ; [: ,:@{.&.|: boxroof&.> | |
final =: graph @ k | |
NB. I need to work on hw >_< | |
NB. displaying | |
tobase =: #.inv | |
digits =: 10 & tobase | |
fromhex =: 16 #. digits | |
fromoct =: 8 #. digits | |
digrows =: (] ;"0 [ ^ |.@i.@#@]) digits | |
disp =: ' + ' joinstring [: dtb&.> [: ;/ '*' joinstring"1 ":&.> | |
expr =: disp @ digrows | |
twist =: |: @ ,: | |
res =: twist @ (expr;[#.digits@]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it may need
require 'strings'
or the like before running, idk