Skip to content

2014-8: Go The Distance

Write a dfn that returns the distance between two points in a space of any number of dimensions.

Examples:

      2 (your_function) 5 ⍝ one-dimensional space
3
      2 2 (your_function) 5 6 ⍝ two-dimensional space
5
      ⍬ (your_function) ⍬ ⍝ zero dimension space
0
      2 2 3 4 (your_function) 3 7 10 9 ⍝ four-dimensions
10
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub