[ transt[k] for k=1:3 ] does the trick.
On Thu, May 22, 2014 at 4:37 PM, Cirrus McInnis <[email protected]> wrote: > New to Julia.. > > Given a hash / dict / associative list like: > transt = { > 1 => "char", > 2 => "short", > 3 => "long", > 4 => "float" > } > > How would I get this?: > println( transt[1:3]) > > "char" > "short" > "long" > > Without resorting to an explicit loop (will if I must, but I'm trying to > learn) > > I've tried various bracket and parenthesis enclosures, no luck. > -David > >
