/# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #/ ;struct LNode (type T) { T data, ~void next } /; method LNode /; get_next_type (type B) [LNode(B)] ;return (self.next)[~LNode(B)]` ;/ /; get_next [LNode(T)] ;return (self.next)[~LNode(T)]` ;/ ;/ ;struct DLNode (type T) extends LNode(T) { super, ~void prev } /; method DLNode /; get_prev_type (type B) [LNode(B)] ;return (self.prev)[~LNode(B)]` ;/ /; get_prev [LNode(T)] ;return (self.prev)[~LNode(T)]` ;/ ;/ ;struct List (type T) { uint length, LNode(T) first, last } ;struct DList (type T) { uint length, DLNode(T) first, last }