Day 1
Setup
You should have already attempted the problems using the nested vector format. Now we will try to solve the problems again, taking advantage of the flat array formats to create faster solutions.
-
Download the updated tests workspace
]get -u https://github.com/dyalog-training/2025-ListsWorkshop/blob/main/lists-of-words.dwsIt contains 4 namespaces:
DEL MAT NEST TestsNESTincludes example solutions using the nested vector format that you can use as a starting point.MATcontains the character matrix format of the words list:⍴MAT.words 43189 20DELcontains the delimited character vector format of the words list:⍴DEL.words 385552 -
For the exercises, define new solution functions in the workspaces
MATandDEL:MAT.CountA ← { your solution here }While developing, you can check your answer against a nested solution:
MAT.(CountA words) 21313 NEST.(CountA words) 21313You can also run the test suite to check your answers:
Tests.Run MAT **Error running test: Test_01_CountA **Solution not found: CountGORS **Solution not found: CountGANDS ··· **Solution not found: RemoveInteriorVowels
Exercises
Define functions to solve the problems using the new formats. Try to leverage properties of each format to derive the fastest solutions possible.