-
partitioned exercise question
from the level 3 partitioned exercise:<b style=”background-color: var(–bb-content-background-color); font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”> allPaths
given solution: allPaths:{[dir]
sv'dir,'k where(k:key dir)like"[0-9]*"}</i></b></p><p>my functional solution: <b><i>allPaths: {[dir] sv[
; ‘dir, ‘k where (k: key dir) like “[0-9]*”]}which returned stype evaluation error, due to the ‘ in front of dir.
It makes sense to remove the ‘ before dir and keep the one in front of k, given dir should only has one element and k can be a list ( and so the “each”). just wondering why is it in the solution that there is the ‘ between sv and dir, and that it works?
Thanks,
Log in to reply.