Last active
November 20, 2020 12:28
-
-
Save kasperpeulen/6ab5783d11b20890a2624e45836d2f2e to your computer and use it in GitHub Desktop.
This file contains 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
multi function rightTrianglesG(maxLengthC: number) { | |
const c = pick range(1, maxLengthC + 1); | |
const a = pick range(1, c); | |
const b = pick range(1, a); | |
pick where(a**2 + b**2 === c**2); | |
return [a, b, c] as const; | |
} | |
multi function where(cond: boolean) { | |
if (cond) return pick []; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment