devmingle
Home
Categories
Popular Codes
Articles
/
Prolog
/
Translate( 1 2 9 one two nine ) prolog programming
Translate( 1 2 9 one two nine ) prolog programming
Translate( 1 2 9 one two nine ) prolog programming
totext(0, 'zero'). totext(1, 'one'). totext(2, 'two'). totext(3, 'three'). totext(4, 'four'). totext(5, 'five'). totext(6, 'six'). totext(7, 'seven'). totext(8, 'eight'). totext(9, 'nine'). translate([], []). translate([Head|Rest], [TranslatedHead|TranslatedRest]) :- totext(Head, TranslatedHead), translate(Rest, TranslatedRest).
0
Source:
stackoverflow.com
Share
Similar codes
2 votes
213 views
1 answer
Prolog assert
Prolog
0 vote
197 views
1 answer
Full adder in prolog
Prolog
0 vote
196 views
1 answer
Prolog if
Prolog
-1 vote
209 views
2 answers
Hello world prolog
Prolog
0 vote
201 views
1 answer
Menu-driven in prolog
Prolog
Share