Created
August 15, 2016 15:21
-
-
Save zoffixznet/54462d18b218598b57a917a305db04be 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
sub distance (\xₙ,\xₒ,\yₙ,\yₒ) { sqrt (xₙ − xₒ)² + (yₙ − yₒ)² } | |
say 'Calculating distance traveled by airplane'; | |
my $dₐ = distance 1, 1, 3, 4; | |
say 'Calculating distance traveled by spaceship'; | |
my $dₛ = distance 1, "oops", 500, 400; | |
say "The difference is {$dₛ − $dₐ}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment