Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
:- object(top_and_tail).
|
||||
|
||||
:- public(test/1).
|
||||
test(String) :-
|
||||
sub_atom(String, 1, _, 0, MinusTop),
|
||||
write('String with first character cut: '), write(MinusTop), nl,
|
||||
sub_atom(String, 0, _, 1, MinusTail),
|
||||
write('String with last character cut: '), write(MinusTail), nl,
|
||||
sub_atom(String, 1, _, 1, MinusTopAndTail),
|
||||
write('String with first and last characters cut: '), write(MinusTopAndTail), nl.
|
||||
|
||||
:- end_object.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
| ?- top_and_tail::test('Rosetta').
|
||||
String with first character cut: osetta
|
||||
String with last character cut: Rosett
|
||||
String with first and last characters cut: osett
|
||||
yes
|
||||
Loading…
Add table
Add a link
Reference in a new issue