Skip to content

2016-4: Just Meshing Around

Write a function that takes vectors as its left and right arguments and returns them “meshed” into a single vector formed by alternately taking successive elements from each argument. The arguments do not have to be the same length.

Examples:

      'MENS' (your_function) 'EKES' 
MEEKNESS
      'Dyalog' (your_function) 'APL'   
DAyPaLlog
      'APL' (your_function) 'Dyalog' 
ADPyLalog
       1 3 5 7 (your_function) 2 4 6 8   ⍝ should work with numeric vectors 
1 2 3 4 5 6 7 8
       '' (your_function) 'Hello'  ⍝ either or both arguments could be empty
Hello
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub