Skip to content

Instantly share code, notes, and snippets.

@relrod
Last active August 29, 2015 14:25
Show Gist options
  • Save relrod/b342f67c26860fdfcbcf to your computer and use it in GitHub Desktop.
Save relrod/b342f67c26860fdfcbcf to your computer and use it in GitHub Desktop.
λ> dist euclidean (V.fromList [-3.9295649822650747]) (V.fromList [8.948812983847764]) <= dist euclidean (V.fromList [-3.9295649822650747]) (V.fromList [1.5350626474279276]) + dist euclidean (V.fromList [1.5350626474279276]) (V.fromList [8.948812983847764])
False
it :: Bool
λ> dist euclidean (V.fromList [-3.9295649822650747]) (V.fromList [8.948812983847764])
12.87837796611284
it :: Double
λ> dist euclidean (V.fromList [-3.9295649822650747]) (V.fromList [1.5350626474279276]) + dist euclidean (V.fromList [1.5350626474279276]) (V.fromList [8.948812983847764])
12.878377966112838
it :: Double
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment