File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 177177 }[generateTableColumns ; generateColumns ];
178178 typeOf : {$ [0 >type x; .axq.i_PRIMCODE neg type x; .axq.i_NONPRIMCODE type x]};
179179 isAtom : {not type [x] within 0 99h };
180- // sample: {[sampleFn; sampleSize; data]
181- // sampleSize: min (sampleSize; count data);
182- // fn: $[ sampleFn ~ "random";
183- // {[sampleSize; data]
184- // $[ type[data] ~ 99h;
185- // [ ii: neg[sampleSize]?count data;
186- // (key[data] ii)!value[data]ii];
187- // neg[sampleSize]?data]
188- // };
189- // sampleFn ~ "first"; #;
190- // sampleFn ~ "last"; {neg[x]#y};
191- // ' "Unrecognized sample function"];
192- // fn[sampleSize; data]
193- // }
180+ sample : {[sampleFn ; sampleSize ; data ]
181+ sampleSize : min (sampleSize ; count data );
182+ fn : $ [ sampleFn ~ "random" ;
183+ {[sampleSize ; data ]
184+ $ [ type [data ] ~ 99h ;
185+ [ ii : neg [sampleSize ]? count data ;
186+ (key [data ] ii )! value [data ]ii ];
187+ neg [sampleSize ]? data ]
188+ };
189+ sampleFn ~ "first" ; # ;
190+ sampleFn ~ "last" ; {neg [x]# y};
191+ ' "Unrecognized sample function" ];
192+ fn [sampleSize ; data ]
193+ }
194194 result : evalInContext [ctx ; splitExpression stripTrailingSemi wrapLines removeMultilineComments code ];
195195 if [result `errored ; : result ];
196196 if [type [result [`result ]] = 99h ;
You can’t perform that action at this time.
0 commit comments