original.name="Template_Valid_16" ====== >>> 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)) 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) --- ===== >>> main.whiley 4:6 if list is null: return n == 0 else: return length(list.next,n-1) ---