How to use the get/2 dictionary function?

I have SWI-Prolog 8.3.27 running on Ubuntu 20.04.2 LTS.
Ubuntu is running in WSL 2 on Windows 10.

The instructions I follow are
Install SWI-Prolog development version on Ubuntu using PPA

Note: I did not need to preform the Installing on Ubuntu needs Universe checked steps.


groot@Galaxy:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
groot@Galaxy:~$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.27)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- Dict = en_pl{cat:kot, dog:pies}, X = Dict.get(fish, unknown).
Dict = en_pl{cat:kot, dog:pies},
X = unknown.
1 Like