original.name="Template_Valid_17" ====== >>> main.whiley type LinkedList is null | { LinkedList next, T data } property length(LinkedList list, int n) -> (bool r): return (list is null && n == 0) || (!(list is null) && length(list.next,n-1)) function recursive(LinkedList l) -> (int len) ensures length(l,len): // if l is null: return 0 else: return 1 + recursive(l.next) public export method test(): LinkedList l1 = null LinkedList l2 = { next: l1, data: 1 } LinkedList l3 = { next: l2, data: 2 } // assert length(l1,0) assert length(l2,1) assert length(l3,2) ---