Skip to content

Instantly share code, notes, and snippets.

@pkulev
Created October 13, 2014 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkulev/dd4194dd2191938d5fa2 to your computer and use it in GitHub Desktop.
Save pkulev/dd4194dd2191938d5fa2 to your computer and use it in GitHub Desktop.
fun {Prefix L1 L2}
case L1
of H|T then
if H == L2.1 then {Prefix T L2.2}
else false end
[] nil then true
end
end
fun {FindString L1 L2}
case L2
of H|T then
if L1.1 == H then {Prefix L1 L2}
else {FindString L1 T} end
[] nil then
if L1 == nil then true
else false end
end
end
@ygit
Copy link

ygit commented Oct 26, 2015

perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment