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
2 votes
237 views
1 answer
Prolog assert
Prolog
0 vote
215 views
1 answer
Full adder in prolog
Prolog
-1 vote
220 views
2 answers
Hello world prolog
Prolog
0 vote
212 views
1 answer
Menu-driven in prolog
Prolog
0 vote
210 views
1 answer
Prolog if
Prolog
Share