uid / snapdown

Draw snapshot diagrams with plain text
MIT License
3 stars 0 forks source link

Eliminate unnecessary arrow crossing #2

Open dwhatley19 opened 4 years ago

dwhatley19 commented 4 years ago

Arrows sometimes cross unnecessarily, as in this diagram:

Screen Shot 2020-07-22 at 11 26 55 AM

Desired diagram looks like this (http://web.mit.edu/6.031/www/sp20/classes/10-abstract-data-types/#@now_same_client):

Screen Shot 2020-07-22 at 11 27 01 AM

Snapdown:

s -> (MyString a -> #1, start -> 0, end -> 4)
t -> (MyString a -> #1, start -> 1, end -> 3)
#1 -> (char 0 -> 't', 1 -> 'r', 2 -> 'u', 3 -> 'e')

Arrows should cross minimally, only when necessary, or not at all.