main=: verb define hdr=. ' target actual ' lbls=. ; ,:&.> ;:'aleph beth gimel daleth he waw zayin heth' prtn=. +/\ pt=. (, 1-+/)1r1%5+i.7 da=. prtn I. ?y # 0 pa=. y%~ +/ da =/ i.8 hdr, lbls,. 9j6 ": |: pt,:pa ) Note 'named abbreviations' hdr (header) lbls (labels) pt (target proportions) prtn (partitions corresponding to target proportions) da (distribution of actual values among partitions) pa (actual proportions) )