Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
define insert_into_list(anchor, x);
|
||||
cons(x, back(anchor)) -> back(anchor);
|
||||
enddefine;
|
||||
;;; Build inital list
|
||||
lvars l1 = cons("a", []);
|
||||
insert_into_list(l1, "b");
|
||||
;;; insert c
|
||||
insert_into_list(l1, "c");
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
uses objectclass;
|
||||
define :class ListNode;
|
||||
slot value = [];
|
||||
slot next = [];
|
||||
enddefine;
|
||||
|
||||
define insert_into_List(anchor, x);
|
||||
consListNode(x, next(anchor)) -> next(anchor);
|
||||
enddefine;
|
||||
;;; Build inital list
|
||||
lvars l2 = consListNode("a", []);
|
||||
insert_into_List(l2, "b");
|
||||
;;; insert c
|
||||
insert_into_List(l2, "c");
|
||||
Loading…
Add table
Add a link
Reference in a new issue