Skip to content

Instantly share code, notes, and snippets.

@paulp
Created April 8, 2014 18:51
Show Gist options
  • Save paulp/10170559 to your computer and use it in GitHub Desktop.
Save paulp/10170559 to your computer and use it in GitHub Desktop.
[?] (letrec length = (\l ⇒ ((cond (isNull l)) 0) (succ (length (tail l)))) in length)
| [+] t0
| [?] (\l ⇒ ((cond (isNull l)) 0) (succ (length (tail l))))
| | [+] t1
| | [?] (((cond (isNull l)) 0) (succ (length (tail l))))
| | | [+] t2
| | | [?] ((cond (isNull l)) 0)
| | | | [+] t3
| | | | [?] (cond (isNull l))
| | | | | [+] t4
| | | | | [?] cond
| | | | | | [+] t5
| | | | | | [+] t6
| | | | | \-
| | | | | [?] (isNull l)
| | | | | | [+] t7
| | | | | | [?] isNull
| | | | | | | [+] t8
| | | | | | | [+] t9
| | | | | | \-
| | | | | | [?] l
| | | | | | [!] t1: List[t9]
| | | | | | [!] t7: Bool
| | | | | \-
| | | | | [!] t4: t6 => (t6 => t6)
| | | | \-
| | | | [?] 0
| | | | [!] t6: Int
| | | | [!] t3: Int => Int
| | | \-
| | | [?] (succ (length (tail l)))
| | | | [+] t10
| | | | [?] succ
| | | | [?] (length (tail l))
| | | | | [+] t11
| | | | | [?] length
| | | | | [?] (tail l)
| | | | | | [+] t12
| | | | | | [?] tail
| | | | | | | [+] t13
| | | | | | | [+] t14
| | | | | | \-
| | | | | | [?] l
| | | | | | [!] t14: t9
| | | | | | [!] t12: List[t9]
| | | | | \-
| | | | | [!] t0: List[t9] => t11
| | | | \-
| | | | [!] t11: Int
| | | | [!] t10: Int
| | | \-
| | | [!] t2: Int
| | \-
| \-
| [?] length
| | [+] t15
| \-
\-
List[α] => Int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment