menu-driven in prolog code example
Example: menu-driven in prolog
get_action(Choice) :-
menu('Title',
[ option_1 : 'Option One'
, option_2 : 'Option Two'
, quit : 'Quit'
], Choice).