# Repl utility - whom()

**URL:** https://discourse.julialang.org/t/repl-utility-whom/8993
**Category:** New to Julia
**Created:** [February 11, 2018, 2:39pm UTC](https://discourse.julialang.org/t/repl-utility-whom/8993 "2018-02-11T14:39:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [February 11, 2018, 2:39pm UTC](https://discourse.julialang.org/t/repl-utility-whom/8993/1 "2018-02-11T14:39:57Z")

</div>

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

```julia
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;
```
