Hi all,

Recently, I found myself looking for a dictionary implementation for J, so
I wrote a little (my first) addon for one.

It can be installed from github via:
install'github:jpjacobs/types_dict@main'

(except on (my) android, where github installs don't seem to work, neither
in the Gui version JA nor on the commandline via termux)

It is pretty simple in use, you just use:
d=: dict keys;vals
for creating the dictionary, which is a OOP object, having the following
methods:
get, set, map, sort, destroy, whose documentation is contained in
help_pdict_

For performance, the create verb precomputes the lookup for the get verb,
both forward get (key->value) and backward get inv (value->first key) upon
object creation.

I hope someone finds it useful. Any tips, hints, comments, requests are
welcome.

Best regards,
Jan-Pieter
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to