13 lines
330 B
Text
13 lines
330 B
Text
( LCS
|
|
= A a ta B b tb prefix
|
|
. !arg:(?prefix.@(?A:%?a ?ta).@(?B:%?b ?tb))
|
|
& ( !a:!b&LCS$(!prefix !a.!ta.!tb)
|
|
| LCS$(!prefix.!A.!tb)&LCS$(!prefix.!ta.!B)
|
|
)
|
|
| !prefix:? ([>!max:[?max):?lcs
|
|
|
|
|
)
|
|
& 0:?max
|
|
& :?lcs
|
|
& LCS$(.thisisatest.testing123testing)
|
|
& out$(max !max lcs !lcs);
|