stackofcodes
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
0 vote
190 views
1 answer
Full adder in prolog
Prolog
0 vote
186 views
1 answer
Prolog if
Prolog
-1 vote
193 views
2 answers
Hello world prolog
Prolog
0 vote
186 views
1 answer
Menu-driven in prolog
Prolog
2 votes
211 views
1 answer
Prolog assert
Prolog
Share