Skip to content

Instantly share code, notes, and snippets.

@lyxal
Created October 15, 2020 00:35
Show Gist options
  • Save lyxal/1fb606f9b40536aa1a9f09a6d4fd4684 to your computer and use it in GitHub Desktop.
Save lyxal/1fb606f9b40536aa1a9f09a6d4fd4684 to your computer and use it in GitHub Desktop.
⊞θ₂ΣXθ²F =+«←←←ι←G↑←↓⊟θ#
⊞θ₂ # Create a template square with size (a^2)
ΣXθ² # Repeat that code but with the second input
F =+ # Push the 3 character string " =+"
« # Reverse it and insert the characters in between the template squares
←←← # Compute sqrt(a^2 + b^2) [3 byte function]
ι← # Use the code to create the template square and generate one based on the prior result
G↑← # Join everything together into a list and make it into a template
⊟θ# # Substitute # into the template and output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment