Repl utility - whom()

simple but handy extension for whos()

whom(“Module”, xpkg = Base) → modules in Base
whom(xpkg = Base.Sys) → functions in Base.Sys
whom(“Array”) → Arrays in main

function whom(xgetch = "#", xdisc = false, xbuf = []; retbuf = false, xpkg = Main)
  if(xbuf == []) 
    xbuf = IOBuffer();
    whos(xbuf, xpkg);
    write(xbuf, "\0");
    end;
  seek(xbuf, 0);
  while(!eof(xbuf))
    k = readline(xbuf);
    b = contains(k, xgetch) == !xdisc;
    if(b) println(k); end;
    end;
  if(retbuf) return(xbuf); end;
  end;