Quiet
Quiet

Reputation: 51

list of string in prolog

How i can break the list of string into two halves to process these halves

Upvotes: 1

Views: 295

Answers (1)

mat
mat

Reputation: 40768

For example with code similar to:

length(String, L),
H is L // 2,
length(First_Half, H),
append(First_Half, Second_Half, String)

Upvotes: 2

Related Questions