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
// module 1 | |
export const sqrt = Math.sqrt; | |
export function square(x) { | |
return x * x; | |
} | |
export function diag(x, y) { | |
return sqrt(square(x) + square(y)); | |
} | |
// importing from module 1 : named |