Skip to content

Instantly share code, notes, and snippets.

@albertywu
Last active August 16, 2016 18:00
Show Gist options
  • Select an option

  • Save albertywu/b3a51f4f654fe8f89b4694cd20ebab70 to your computer and use it in GitHub Desktop.

Select an option

Save albertywu/b3a51f4f654fe8f89b4694cd20ebab70 to your computer and use it in GitHub Desktop.

merge

[s1] ----a-----b--c---->
[s2] o----------------->
   s3 = s1.merge(s2)
[s3] o---a-----b--c---->

startsWith, merge

[s1] ----u--------u--->
    s1.startsWith(N)
[s2] N---u--------u--->
[s3] -------r---r----->
  s2.merge(s3.map(e => N))
[s3] N---u--N---N-u--->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment