Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Array-concatenation/Picat/array-concatenation.picat
Normal file
12
Task/Array-concatenation/Picat/array-concatenation.picat
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
go =>
|
||||
L1 = {1,2,3,4,5}, % define an array with {}
|
||||
L2 = {6,7,8,9},
|
||||
|
||||
% The built-in array/list concatenation
|
||||
println(L1 ++ L2),
|
||||
|
||||
% Using the built-in append/3 works only on lists
|
||||
% so the arrays must be converted to lists.
|
||||
append(L1.to_list,L2.to_list,L3),
|
||||
println(L3.to_array),
|
||||
nl.
|
||||
Loading…
Add table
Add a link
Reference in a new issue